diff --git a/src/FuzeWorks/Config.php b/src/FuzeWorks/Config.php index c7bccb9..1bc20d0 100644 --- a/src/FuzeWorks/Config.php +++ b/src/FuzeWorks/Config.php @@ -144,7 +144,7 @@ class Config * @param string $directory The directory * @return void */ - public function addConfigPath($directory): void + public function addConfigPath($directory) { if (!in_array($directory, $this->configPaths)) { @@ -158,7 +158,7 @@ class Config * @param string $directory The directory * @return void */ - public function removeConfigPath($directory): void + public function removeConfigPath($directory) { if (($key = array_search($directory, $this->configPaths)) !== false) { diff --git a/src/FuzeWorks/Core.php b/src/FuzeWorks/Core.php index aaff4f3..04ca87d 100644 --- a/src/FuzeWorks/Core.php +++ b/src/FuzeWorks/Core.php @@ -127,7 +127,7 @@ class Core * * Afterwards run the Logger shutdown function in order to possibly display the log */ - public static function shutdown(): void + public static function shutdown() { // Fix Apache bug where CWD is changed upon shutdown chdir(self::$cwd); @@ -245,7 +245,7 @@ class Core * @param string * @return void */ - public static function setStatusHeader($code = 200, $text = ''): void + public static function setStatusHeader($code = 200, $text = '') { if (self::isCli()) { diff --git a/src/FuzeWorks/DatabaseTracyBridge.php b/src/FuzeWorks/DatabaseTracyBridge.php index 07b65aa..ccb97e8 100644 --- a/src/FuzeWorks/DatabaseTracyBridge.php +++ b/src/FuzeWorks/DatabaseTracyBridge.php @@ -51,14 +51,14 @@ class DatabaseTracyBridge implements IBarPanel public static $databases = array(); protected $results = array(); - public static function register(): void + public static function register() { $class = new self(); $bar = Debugger::getBar(); $bar->addPanel($class); } - public static function registerDatabase($database): void + public static function registerDatabase($database) { self::$databases[] = $database; } diff --git a/src/FuzeWorks/Event.php b/src/FuzeWorks/Event.php index d160718..8dc7cc3 100644 --- a/src/FuzeWorks/Event.php +++ b/src/FuzeWorks/Event.php @@ -55,7 +55,7 @@ class Event /** * @param bool $cancelled True if the event is cancelled, false if the event is not cancelled */ - public function setCancelled($cancelled): void + public function setCancelled($cancelled) { if ($cancelled == true) { $this->cancelled = true; diff --git a/src/FuzeWorks/Events.php b/src/FuzeWorks/Events.php index 40ee73f..8246341 100644 --- a/src/FuzeWorks/Events.php +++ b/src/FuzeWorks/Events.php @@ -81,7 +81,7 @@ class Events * * @throws EventException */ - public static function addListener($callback, $eventName, $priority = EventPriority::NORMAL): void + public static function addListener($callback, $eventName, $priority = EventPriority::NORMAL) { // Perform multiple checks if (EventPriority::getPriority($priority) == false) { @@ -120,7 +120,7 @@ class Events * * @throws EventException */ - public static function removeListener($callback, $eventName, $priority = EventPriority::NORMAL): void + public static function removeListener($callback, $eventName, $priority = EventPriority::NORMAL) { if (EventPriority::getPriority($priority) == false) { throw new EventException('Unknown priority '.$priority); @@ -250,7 +250,7 @@ class Events /** * Enables the event system. */ - public static function enable(): void + public static function enable() { Logger::log('Enabled the Event system'); self::$enabled = true; @@ -259,7 +259,7 @@ class Events /** * Disables the event system. */ - public static function disable(): void + public static function disable() { Logger::log('Disabled the Event system'); self::$enabled = false; diff --git a/src/FuzeWorks/Factory.php b/src/FuzeWorks/Factory.php index af2dc8f..5c013ae 100644 --- a/src/FuzeWorks/Factory.php +++ b/src/FuzeWorks/Factory.php @@ -223,7 +223,7 @@ class Factory * * @return void */ - public static function enableCloneInstances(): void + public static function enableCloneInstances() { self::$cloneInstances = true; } @@ -233,7 +233,7 @@ class Factory * * @return void */ - public static function disableCloneInstances(): void + public static function disableCloneInstances() { self::$cloneInstances = false; } diff --git a/src/FuzeWorks/GitTracyBridge.php b/src/FuzeWorks/GitTracyBridge.php index b00bafc..c42834b 100644 --- a/src/FuzeWorks/GitTracyBridge.php +++ b/src/FuzeWorks/GitTracyBridge.php @@ -49,7 +49,7 @@ class GitTracyBridge implements IBarPanel { /** * Register the bar */ - public static function register(): void + public static function register() { $class = new self(); $bar = Debugger::getBar(); diff --git a/src/FuzeWorks/Helpers.php b/src/FuzeWorks/Helpers.php index 43265da..b1bca68 100644 --- a/src/FuzeWorks/Helpers.php +++ b/src/FuzeWorks/Helpers.php @@ -185,7 +185,7 @@ class Helpers * @param string $directory The directory * @return void */ - public function addHelperPath($directory): void + public function addHelperPath($directory) { if (!in_array($directory, $this->helperPaths)) { @@ -199,7 +199,7 @@ class Helpers * @param string $directory The directory * @return void */ - public function removeHelperPath($directory): void + public function removeHelperPath($directory) { if (($key = array_search($directory, $this->helperPaths)) !== false) { diff --git a/src/FuzeWorks/Input.php b/src/FuzeWorks/Input.php index e65fbb3..6abc610 100644 --- a/src/FuzeWorks/Input.php +++ b/src/FuzeWorks/Input.php @@ -349,7 +349,7 @@ class Input { * @param bool $httponly Whether to only makes the cookie accessible via HTTP (no javascript) * @return void */ - public function set_cookie($name, $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE, $httponly = FALSE): void + public function set_cookie($name, $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE, $httponly = FALSE) { if (is_array($name)) { @@ -592,7 +592,7 @@ class Input { * * @return void */ - protected function _sanitize_globals(): void + protected function _sanitize_globals() { // Is $_GET data allowed? If not we'll set the $_GET to an empty array if ($this->_allow_get_array === FALSE) diff --git a/src/FuzeWorks/Language.php b/src/FuzeWorks/Language.php index fac147b..94db4dc 100644 --- a/src/FuzeWorks/Language.php +++ b/src/FuzeWorks/Language.php @@ -77,7 +77,7 @@ class Language */ protected static $is_loaded = array(); - public static function init(): void + public static function init() { self::$languagePaths[] = Core::$appDir . DS . 'Language'; } diff --git a/src/FuzeWorks/Layout.php b/src/FuzeWorks/Layout.php index d8a062d..5e1c1b1 100644 --- a/src/FuzeWorks/Layout.php +++ b/src/FuzeWorks/Layout.php @@ -92,7 +92,7 @@ class Layout */ private $current_engine; - public function init(): void + public function init() { $this->directory = Core::$appDir . DS .'Layout'; } @@ -111,7 +111,7 @@ class Layout * * @throws LayoutException On error */ - public function display($file, $directory = null, $directOutput = false): void + public function display($file, $directory = null, $directOutput = false) { $output = Factory::getInstance()->output; $directory = (is_null($directory) ? $this->directory : $directory); @@ -305,7 +305,7 @@ class Layout * @return string Filepath of the template * @throws LayoutException On error */ - public function setFileFromString($string, $directory, $extensions = array()): void + public function setFileFromString($string, $directory, $extensions = array()) { $this->file = $this->getFileFromString($string, $directory, $extensions); $this->directory = preg_replace('#/+#', '/', (!is_null($directory) ? $directory : $this->directory).DS); @@ -346,7 +346,7 @@ class Layout * * @param string $directory Path to the directory */ - public function setDirectory($directory): void + public function setDirectory($directory) { $this->directory = $directory; } @@ -357,7 +357,7 @@ class Layout * @param string $key Key of the variable * @param mixed $value Value of the variable */ - public function assign($key, $value): void + public function assign($key, $value) { $this->assigned_variables[$key] = $value; } @@ -367,7 +367,7 @@ class Layout * * @param string $title title of the template */ - public function setTitle($title): void + public function setTitle($title) { $this->assigned_variables['title'] = $title; } @@ -471,7 +471,7 @@ class Layout /** * Load the template engines by sending a layoutLoadEngineEvent. */ - public function loadTemplateEngines(): void + public function loadTemplateEngines() { if (!$this->engines_loaded) { Events::fireEvent('layoutLoadEngineEvent'); @@ -508,7 +508,7 @@ class Layout /** * Resets the layout manager to its default state. */ - public function reset(): void + public function reset() { if (!is_null($this->current_engine)) { $this->current_engine->reset(); diff --git a/src/FuzeWorks/Libraries.php b/src/FuzeWorks/Libraries.php index defa5dc..d2da8c4 100644 --- a/src/FuzeWorks/Libraries.php +++ b/src/FuzeWorks/Libraries.php @@ -428,7 +428,7 @@ class Libraries * @param string $directory The directory * @return void */ - public function addLibraryPath($directory): void + public function addLibraryPath($directory) { if (!in_array($directory, $this->libraryPaths)) { @@ -442,7 +442,7 @@ class Libraries * @param string $directory The directory * @return void */ - public function removeLibraryPath($directory): void + public function removeLibraryPath($directory) { if (($key = array_search($directory, $this->libraryPaths)) !== false) { diff --git a/src/FuzeWorks/Logger.php b/src/FuzeWorks/Logger.php index 5d81691..1d55f18 100644 --- a/src/FuzeWorks/Logger.php +++ b/src/FuzeWorks/Logger.php @@ -33,7 +33,7 @@ namespace FuzeWorks; -use FuzeWorks\Exception\Exception; +use FuzeWorks\Exception\Exception; use FuzeWorks\Exception\LayoutException; /** @@ -133,7 +133,7 @@ class Logger { * * Logs data to screen when requested to do so */ - public static function shutdown(): void + public static function shutdown() { // And finally stop the Logging self::stopLevel(); @@ -156,7 +156,7 @@ class Logger { * * Logs a fatal error and outputs the log when configured or requested to do so */ - public static function shutdownError(): void + public static function shutdownError() { // Load last error if thrown $errfile = 'Unknown file'; @@ -192,7 +192,7 @@ class Logger { * @param int Line. The line on which the error occured. * @param array context. Some of the error's relevant variables */ - public static function errorHandler($type = E_USER_NOTICE, $error = 'Undefined Error', $errFile = null, $errLine = null, $context = null): void + public static function errorHandler($type = E_USER_NOTICE, $error = 'Undefined Error', $errFile = null, $errLine = null, $context = null) { // Check type $thisType = self::getType($type); @@ -212,7 +212,7 @@ class Logger { * * @param Exception $exception The occured exception. */ - public static function exceptionHandler($exception): void + public static function exceptionHandler($exception) { $message = $exception->getMessage(); $code = $exception->getCode(); @@ -233,7 +233,7 @@ class Logger { * * @var string Name of the template file */ - public static function setLoggerTemplate($templateName): void + public static function setLoggerTemplate($templateName) { self::$logger_template = $templateName; } @@ -258,7 +258,7 @@ class Logger { * Output the entire log to a file. Used for debugging problems with your code. * @codeCoverageIgnore */ - public static function logToFile(): void + public static function logToFile() { ob_start(function () {}); $logs = self::$Logs; @@ -282,7 +282,7 @@ class Logger { * @param string $name Marker name * @return void */ - public static function mark($name): void + public static function mark($name) { $LOG = array('type' => 'BMARK', 'message' => (!is_null($name) ? $name : ''), @@ -302,7 +302,7 @@ class Logger { * @param string $file The file where the log occured * @param int $line The line where the log occured */ - public static function log($msg, $mod = null, $file = 0, $line = 0): void + public static function log($msg, $mod = null, $file = 0, $line = 0) { self::logInfo($msg, $mod, $file, $line); } @@ -315,7 +315,7 @@ class Logger { * @param string $file The file where the log occured * @param int $line The line where the log occured */ - public static function logInfo($msg, $mod = null, $file = 0, $line = 0): void + public static function logInfo($msg, $mod = null, $file = 0, $line = 0) { $LOG = array('type' => 'INFO', 'message' => (!is_null($msg) ? $msg : ''), @@ -335,7 +335,7 @@ class Logger { * @param string $file The file where the log occured * @param int $line The line where the log occured */ - public static function logDebug($msg, $mod = null, $file = 0, $line = 0): void + public static function logDebug($msg, $mod = null, $file = 0, $line = 0) { $LOG = array('type' => 'DEBUG', 'message' => (!is_null($msg) ? $msg : ''), @@ -355,7 +355,7 @@ class Logger { * @param string $file The file where the log occured * @param int $line The line where the log occured */ - public static function logError($msg, $mod = null, $file = 0, $line = 0): void + public static function logError($msg, $mod = null, $file = 0, $line = 0) { $LOG = array('type' => 'ERROR', 'message' => (!is_null($msg) ? $msg : ''), @@ -375,7 +375,7 @@ class Logger { * @param string $file The file where the log occured * @param int $line The line where the log occured */ - public static function logWarning($msg, $mod = null, $file = 0, $line = 0): void + public static function logWarning($msg, $mod = null, $file = 0, $line = 0) { $LOG = array('type' => 'WARNING', 'message' => (!is_null($msg) ? $msg : ''), @@ -395,7 +395,7 @@ class Logger { * @param string $file The file where the log occured * @param int $line The line where the log occured */ - public static function newLevel($msg, $mod = null, $file = null, $line = null): void + public static function newLevel($msg, $mod = null, $file = null, $line = null) { $LOG = array('type' => 'LEVEL_START', 'message' => (!is_null($msg) ? $msg : ''), @@ -415,7 +415,7 @@ class Logger { * @param string $file The file where the log occured * @param int $line The line where the log occured */ - public static function stopLevel($msg = null, $mod = null, $file = null, $line = null): void + public static function stopLevel($msg = null, $mod = null, $file = null, $line = null) { $LOG = array('type' => 'LEVEL_STOP', 'message' => (!is_null($msg) ? $msg : ''), @@ -548,7 +548,7 @@ class Logger { /** * Enable error to screen logging. */ - public static function enable(): void + public static function enable() { self::$print_to_screen = true; } @@ -556,7 +556,7 @@ class Logger { /** * Disable error to screen logging. */ - public static function disable(): void + public static function disable() { self::$print_to_screen = false; } diff --git a/src/FuzeWorks/LoggerTracyBridge.php b/src/FuzeWorks/LoggerTracyBridge.php index 86c5553..cfd57cf 100644 --- a/src/FuzeWorks/LoggerTracyBridge.php +++ b/src/FuzeWorks/LoggerTracyBridge.php @@ -50,7 +50,7 @@ class LoggerTracyBridge implements IBarPanel { /** * Register the bar and register the event which will block the screen log */ - public static function register(): void + public static function register() { $class = new self(); Events::addListener(array($class, 'screenLogEventListener'), 'screenLogEvent', EventPriority::NORMAL); diff --git a/src/FuzeWorks/Models.php b/src/FuzeWorks/Models.php index 3b2b630..87fb938 100644 --- a/src/FuzeWorks/Models.php +++ b/src/FuzeWorks/Models.php @@ -166,7 +166,7 @@ class Models * @param string $directory The directory * @return void */ - public function addModelPath($directory): void + public function addModelPath($directory) { if (!in_array($directory, $this->ModelPaths)) { @@ -180,7 +180,7 @@ class Models * @param string $directory The directory * @return void */ - public function removeModelPath($directory): void + public function removeModelPath($directory) { if (($key = array_search($directory, $this->modelPaths)) !== false) { diff --git a/src/FuzeWorks/Output.php b/src/FuzeWorks/Output.php index 30c5f66..ded2bd3 100644 --- a/src/FuzeWorks/Output.php +++ b/src/FuzeWorks/Output.php @@ -406,7 +406,7 @@ class Output { * @param string $output Output data override * @return void */ - public function _display($output = ''): void + public function _display($output = '') { $router = $this->factory->router; // Grab the super object if we can. @@ -527,7 +527,7 @@ class Output { * @param string $output Output data to cache * @return void */ - public function _write_cache($output): void + public function _write_cache($output) { $cache_path = Core::$tempDir . DS . 'Output' . DS; @@ -770,7 +770,7 @@ class Output { * @param int $expiration Timestamp of when should the requested page expire from cache * @return void */ - public function set_cache_header($last_modified, $expiration): void + public function set_cache_header($last_modified, $expiration) { $max_age = $expiration - $_SERVER['REQUEST_TIME']; diff --git a/src/FuzeWorks/Router.php b/src/FuzeWorks/Router.php index 0bc6493..85aa3a3 100644 --- a/src/FuzeWorks/Router.php +++ b/src/FuzeWorks/Router.php @@ -175,7 +175,7 @@ class Router * * @return void */ - protected function parseRouting(): void + protected function parseRouting() { // Get routing routes $routes = $this->config->routes; @@ -257,7 +257,7 @@ class Router * @param bool $prepend Whether or not to insert at the beginning of the routing table * @return void */ - public function addRoute($route, $callable, $prepend = true): void + public function addRoute($route, $callable, $prepend = true) { if ($prepend) { $this->routes = array($route => $callable) + $this->routes; @@ -273,7 +273,7 @@ class Router * * @param $route string The route to remove */ - public function removeRoute($route): void + public function removeRoute($route) { unset($this->routes[$route]); @@ -374,7 +374,7 @@ class Router * @param string @route The route which was matched * @return void */ - protected function routeDefault($segments = array(), $route): void + protected function routeDefault($segments = array(), $route) { // If we don't have any segments left - try the default controller; // WARNING: Directories get shifted out of the segments array! @@ -485,7 +485,7 @@ class Router * This callable will do the 'old skool' routing. It will load the controllers from the controller-directory * in the application-directory. */ - public function defaultCallable($arguments = array()): void + public function defaultCallable($arguments = array()) { $this->logger->log('Default callable called!'); diff --git a/src/FuzeWorks/Security.php b/src/FuzeWorks/Security.php index 9c841c9..ff02e38 100644 --- a/src/FuzeWorks/Security.php +++ b/src/FuzeWorks/Security.php @@ -31,7 +31,7 @@ */ namespace FuzeWorks; -use FuzeWorks\ConfigORM\ConfigORM; +use FuzeWorks\ConfigORM\ConfigORM; use FuzeWorks\Exception\{SecurityException,Exception}; /** @@ -288,7 +288,7 @@ class Security { * * @return void */ - public function csrf_show_error(): void + public function csrf_show_error() { throw new SecurityException('The action you have requested is not allowed.', 1); } diff --git a/src/FuzeWorks/URI.php b/src/FuzeWorks/URI.php index 5f2e366..0f6d690 100644 --- a/src/FuzeWorks/URI.php +++ b/src/FuzeWorks/URI.php @@ -31,7 +31,7 @@ */ namespace FuzeWorks; -use FuzeWorks\ConfigORM\ConfigORM; +use FuzeWorks\ConfigORM\ConfigORM; use FuzeWorks\Exception\UriException; /** @@ -167,7 +167,7 @@ class URI { * @param string $str * @return void */ - protected function _set_uri_string($str, $is_cli = FALSE): void + protected function _set_uri_string($str, $is_cli = FALSE) { if ($is_cli) {