@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | */ |
| 11 | 11 | // ------------------------------------------------------------------------ |
| 12 | 12 | |
| 13 | -if ( ! function_exists('o2system')) { |
|
| 13 | +if (!function_exists('o2system')) { |
|
| 14 | 14 | /** |
| 15 | 15 | * o2system |
| 16 | 16 | * |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | // ------------------------------------------------------------------------ |
| 28 | 28 | |
| 29 | -if ( ! function_exists('loader')) { |
|
| 29 | +if (!function_exists('loader')) { |
|
| 30 | 30 | /** |
| 31 | 31 | * loader |
| 32 | 32 | * |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | function loader() |
| 38 | 38 | { |
| 39 | - if(services()->has('loader')) { |
|
| 39 | + if (services()->has('loader')) { |
|
| 40 | 40 | return services()->get('loader'); |
| 41 | 41 | } |
| 42 | 42 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | // ------------------------------------------------------------------------ |
| 48 | 48 | |
| 49 | -if ( ! function_exists('config')) { |
|
| 49 | +if (!function_exists('config')) { |
|
| 50 | 50 | /** |
| 51 | 51 | * config |
| 52 | 52 | * |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | if ($numArgs = count($args)) { |
| 62 | 62 | $config = o2system()->config; |
| 63 | 63 | |
| 64 | - if($numArgs == 1) { |
|
| 64 | + if ($numArgs == 1) { |
|
| 65 | 65 | return call_user_func_array([&$config, 'getItem'], $args); |
| 66 | 66 | } else { |
| 67 | 67 | return call_user_func_array([&$config, 'loadFile'], $args); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | // ------------------------------------------------------------------------ |
| 76 | 76 | |
| 77 | -if ( ! function_exists('globals')) { |
|
| 77 | +if (!function_exists('globals')) { |
|
| 78 | 78 | /** |
| 79 | 79 | * globals |
| 80 | 80 | * |
@@ -87,8 +87,8 @@ discard block |
||
| 87 | 87 | $args = func_get_args(); |
| 88 | 88 | |
| 89 | 89 | if (count($args)) { |
| 90 | - if (isset($GLOBALS[ $args[ 0 ] ])) { |
|
| 91 | - return $GLOBALS[ $args[ 0 ] ]; |
|
| 90 | + if (isset($GLOBALS[$args[0]])) { |
|
| 91 | + return $GLOBALS[$args[0]]; |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | return null; |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | // ------------------------------------------------------------------------ |
| 102 | 102 | |
| 103 | -if ( ! function_exists('env')) { |
|
| 103 | +if (!function_exists('env')) { |
|
| 104 | 104 | /** |
| 105 | 105 | * env |
| 106 | 106 | * |
@@ -113,8 +113,8 @@ discard block |
||
| 113 | 113 | $args = func_get_args(); |
| 114 | 114 | |
| 115 | 115 | if (count($args)) { |
| 116 | - if (isset($_ENV[ $args[ 0 ] ])) { |
|
| 117 | - return $_ENV[ $args[ 0 ] ]; |
|
| 116 | + if (isset($_ENV[$args[0]])) { |
|
| 117 | + return $_ENV[$args[0]]; |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | return null; |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | // ------------------------------------------------------------------------ |
| 128 | 128 | |
| 129 | -if ( ! function_exists('cache')) { |
|
| 129 | +if (!function_exists('cache')) { |
|
| 130 | 130 | /** |
| 131 | 131 | * cache |
| 132 | 132 | * |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | */ |
| 137 | 137 | function cache() |
| 138 | 138 | { |
| 139 | - if(services()->has('cache')) { |
|
| 139 | + if (services()->has('cache')) { |
|
| 140 | 140 | return services()->get('cache'); |
| 141 | 141 | } |
| 142 | 142 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | // ------------------------------------------------------------------------ |
| 148 | 148 | |
| 149 | -if ( ! function_exists('database')) { |
|
| 149 | +if (!function_exists('database')) { |
|
| 150 | 150 | /** |
| 151 | 151 | * database |
| 152 | 152 | * |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | |
| 163 | 163 | // ------------------------------------------------------------------------ |
| 164 | 164 | |
| 165 | -if ( ! function_exists('models')) { |
|
| 165 | +if (!function_exists('models')) { |
|
| 166 | 166 | /** |
| 167 | 167 | * models |
| 168 | 168 | * |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | $args = func_get_args(); |
| 176 | 176 | |
| 177 | 177 | if (count($args)) { |
| 178 | - return o2system()->models->get($args[ 0 ]); |
|
| 178 | + return o2system()->models->get($args[0]); |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | return o2system()->models; |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | |
| 185 | 185 | // ------------------------------------------------------------------------ |
| 186 | 186 | |
| 187 | -if ( ! function_exists('router')) { |
|
| 187 | +if (!function_exists('router')) { |
|
| 188 | 188 | /** |
| 189 | 189 | * router |
| 190 | 190 | * |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | */ |
| 195 | 195 | function router() |
| 196 | 196 | { |
| 197 | - if(services()->has('router')) { |
|
| 197 | + if (services()->has('router')) { |
|
| 198 | 198 | return services()->get('router'); |
| 199 | 199 | } |
| 200 | 200 | |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | |
| 205 | 205 | // ------------------------------------------------------------------------ |
| 206 | 206 | |
| 207 | -if ( ! function_exists('session')) { |
|
| 207 | +if (!function_exists('session')) { |
|
| 208 | 208 | /** |
| 209 | 209 | * session |
| 210 | 210 | * |
@@ -217,8 +217,8 @@ discard block |
||
| 217 | 217 | $args = func_get_args(); |
| 218 | 218 | |
| 219 | 219 | if (count($args)) { |
| 220 | - if(isset($_SESSION[ $args[0] ])) { |
|
| 221 | - return $_SESSION[ $args[0] ]; |
|
| 220 | + if (isset($_SESSION[$args[0]])) { |
|
| 221 | + return $_SESSION[$args[0]]; |
|
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | return null; |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | |
| 231 | 231 | // ------------------------------------------------------------------------ |
| 232 | 232 | |
| 233 | -if ( ! function_exists('middleware')) { |
|
| 233 | +if (!function_exists('middleware')) { |
|
| 234 | 234 | /** |
| 235 | 235 | * O2System |
| 236 | 236 | * |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | */ |
| 241 | 241 | function middleware() |
| 242 | 242 | { |
| 243 | - if(services()->has('middleware')) { |
|
| 243 | + if (services()->has('middleware')) { |
|
| 244 | 244 | return services()->get('middleware'); |
| 245 | 245 | } |
| 246 | 246 | |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | |
| 251 | 251 | // ------------------------------------------------------------------------ |
| 252 | 252 | |
| 253 | -if ( ! function_exists('controller')) { |
|
| 253 | +if (!function_exists('controller')) { |
|
| 254 | 254 | /** |
| 255 | 255 | * controller |
| 256 | 256 | * |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | */ |
| 261 | 261 | function controller() |
| 262 | 262 | { |
| 263 | - if(services()->has('controller')) { |
|
| 263 | + if (services()->has('controller')) { |
|
| 264 | 264 | $args = func_get_args(); |
| 265 | 265 | |
| 266 | 266 | if (count($args)) { |
@@ -48,8 +48,8 @@ discard block |
||
| 48 | 48 | * |
| 49 | 49 | * WITH TRAILING SLASH! |
| 50 | 50 | */ |
| 51 | -if ( ! defined('PATH_VENDOR')) { |
|
| 52 | - define('PATH_VENDOR', PATH_ROOT . 'vendor' . DIRECTORY_SEPARATOR); |
|
| 51 | +if (!defined('PATH_VENDOR')) { |
|
| 52 | + define('PATH_VENDOR', PATH_ROOT.'vendor'.DIRECTORY_SEPARATOR); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /* |
@@ -61,8 +61,8 @@ discard block |
||
| 61 | 61 | * |
| 62 | 62 | * WITH TRAILING SLASH! |
| 63 | 63 | */ |
| 64 | -if ( ! defined('PATH_REACTOR')) { |
|
| 65 | - define('PATH_REACTOR', __DIR__ . DIRECTORY_SEPARATOR); |
|
| 64 | +if (!defined('PATH_REACTOR')) { |
|
| 65 | + define('PATH_REACTOR', __DIR__.DIRECTORY_SEPARATOR); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /* |
@@ -74,8 +74,8 @@ discard block |
||
| 74 | 74 | * |
| 75 | 75 | * WITH TRAILING SLASH! |
| 76 | 76 | */ |
| 77 | -if ( ! defined('PATH_APP')) { |
|
| 78 | - define('PATH_APP', PATH_ROOT . DIR_APP . DIRECTORY_SEPARATOR); |
|
| 77 | +if (!defined('PATH_APP')) { |
|
| 78 | + define('PATH_APP', PATH_ROOT.DIR_APP.DIRECTORY_SEPARATOR); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /* |
@@ -87,8 +87,8 @@ discard block |
||
| 87 | 87 | * |
| 88 | 88 | * WITH TRAILING SLASH! |
| 89 | 89 | */ |
| 90 | -if ( ! defined('PATH_PUBLIC')) { |
|
| 91 | - define('PATH_PUBLIC', PATH_ROOT . DIR_PUBLIC . DIRECTORY_SEPARATOR); |
|
| 90 | +if (!defined('PATH_PUBLIC')) { |
|
| 91 | + define('PATH_PUBLIC', PATH_ROOT.DIR_PUBLIC.DIRECTORY_SEPARATOR); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /* |
@@ -100,8 +100,8 @@ discard block |
||
| 100 | 100 | * |
| 101 | 101 | * WITH TRAILING SLASH! |
| 102 | 102 | */ |
| 103 | -if ( ! defined('PATH_CACHE')) { |
|
| 104 | - define('PATH_CACHE', PATH_ROOT . DIR_CACHE . DIRECTORY_SEPARATOR); |
|
| 103 | +if (!defined('PATH_CACHE')) { |
|
| 104 | + define('PATH_CACHE', PATH_ROOT.DIR_CACHE.DIRECTORY_SEPARATOR); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /* |
@@ -113,8 +113,8 @@ discard block |
||
| 113 | 113 | * |
| 114 | 114 | * WITH TRAILING SLASH! |
| 115 | 115 | */ |
| 116 | -if ( ! defined('PATH_STORAGE')) { |
|
| 117 | - define('PATH_STORAGE', PATH_ROOT . DIR_STORAGE . DIRECTORY_SEPARATOR); |
|
| 116 | +if (!defined('PATH_STORAGE')) { |
|
| 117 | + define('PATH_STORAGE', PATH_ROOT.DIR_STORAGE.DIRECTORY_SEPARATOR); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /* |
@@ -126,8 +126,8 @@ discard block |
||
| 126 | 126 | * |
| 127 | 127 | * WITH TRAILING SLASH! |
| 128 | 128 | */ |
| 129 | -if ( ! defined('PATH_DATABASE')) { |
|
| 130 | - define('PATH_DATABASE', PATH_ROOT . DIR_DATABASE . DIRECTORY_SEPARATOR); |
|
| 129 | +if (!defined('PATH_DATABASE')) { |
|
| 130 | + define('PATH_DATABASE', PATH_ROOT.DIR_DATABASE.DIRECTORY_SEPARATOR); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /* |
@@ -135,14 +135,14 @@ discard block |
||
| 135 | 135 | * FRAMEWORK CONSTANTS |
| 136 | 136 | *--------------------------------------------------------------- |
| 137 | 137 | */ |
| 138 | -require __DIR__ . '/Config/Constants.php'; |
|
| 138 | +require __DIR__.'/Config/Constants.php'; |
|
| 139 | 139 | |
| 140 | 140 | /* |
| 141 | 141 | *--------------------------------------------------------------- |
| 142 | 142 | * FRAMEWORK HELPERS |
| 143 | 143 | *--------------------------------------------------------------- |
| 144 | 144 | */ |
| 145 | -require __DIR__ . '/Helpers/Reactor.php'; |
|
| 145 | +require __DIR__.'/Helpers/Reactor.php'; |
|
| 146 | 146 | |
| 147 | 147 | /** |
| 148 | 148 | * Class Reactor |
@@ -298,12 +298,12 @@ discard block |
||
| 298 | 298 | } |
| 299 | 299 | |
| 300 | 300 | if (profiler() !== false) { |
| 301 | - profiler()->watch('Instantiating Requested Commander: ' . $commander->getClass()); |
|
| 301 | + profiler()->watch('Instantiating Requested Commander: '.$commander->getClass()); |
|
| 302 | 302 | } |
| 303 | 303 | $requestCommander = $commander->getInstance(); |
| 304 | 304 | |
| 305 | 305 | if (profiler() !== false) { |
| 306 | - profiler()->watch('Execute Requested Commander: ' . $commander->getClass()); |
|
| 306 | + profiler()->watch('Execute Requested Commander: '.$commander->getClass()); |
|
| 307 | 307 | } |
| 308 | 308 | $requestCommander->execute(); |
| 309 | 309 | |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | } |
| 338 | 338 | middleware()->run(); |
| 339 | 339 | |
| 340 | - if($this->services->has('controller')) { |
|
| 340 | + if ($this->services->has('controller')) { |
|
| 341 | 341 | $controller = $this->services->get('controller'); |
| 342 | 342 | |
| 343 | 343 | // Autoload Model |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | } |
| 349 | 349 | |
| 350 | 350 | if (profiler() !== false) { |
| 351 | - profiler()->watch('Instantiating Requested Controller: ' . $controller->getClass()); |
|
| 351 | + profiler()->watch('Instantiating Requested Controller: '.$controller->getClass()); |
|
| 352 | 352 | } |
| 353 | 353 | $requestController = $controller->getInstance(); |
| 354 | 354 | |