GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 28d14f...c253f8 )
by
unknown
03:01
created
src/Cli/Commanders/Maintenance.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function optionLifetime($lifetime)
154 154
     {
155
-        $this->optionLifetime = (int)$lifetime;
155
+        $this->optionLifetime = (int) $lifetime;
156 156
     }
157 157
 
158 158
     // ------------------------------------------------------------------------
@@ -191,16 +191,16 @@  discard block
 block discarded – undo
191 191
         $options = input()->get();
192 192
 
193 193
         if (empty($options)) {
194
-            $_GET[ 'switch' ] = 'ON';
195
-            $_GET[ 'mode' ] = 'default';
196
-            $_GET[ 'lifetime' ] = 300;
197
-            $_GET[ 'title' ] = language()->getLine(strtoupper('CLI_MAINTENANCE_TITLE'));
198
-            $_GET[ 'message' ] = language()->getLine(strtoupper('CLI_MAINTENANCE_MESSAGE'));
194
+            $_GET['switch'] = 'ON';
195
+            $_GET['mode'] = 'default';
196
+            $_GET['lifetime'] = 300;
197
+            $_GET['title'] = language()->getLine(strtoupper('CLI_MAINTENANCE_TITLE'));
198
+            $_GET['message'] = language()->getLine(strtoupper('CLI_MAINTENANCE_MESSAGE'));
199 199
         } else {
200
-            $_GET[ 'mode' ] = 'default';
201
-            $_GET[ 'lifetime' ] = 300;
202
-            $_GET[ 'title' ] = language()->getLine(strtoupper('CLI_MAINTENANCE_TITLE'));
203
-            $_GET[ 'message' ] = language()->getLine(strtoupper('CLI_MAINTENANCE_MESSAGE'));
200
+            $_GET['mode'] = 'default';
201
+            $_GET['lifetime'] = 300;
202
+            $_GET['title'] = language()->getLine(strtoupper('CLI_MAINTENANCE_TITLE'));
203
+            $_GET['message'] = language()->getLine(strtoupper('CLI_MAINTENANCE_MESSAGE'));
204 204
         }
205 205
 
206 206
         parent::execute();
@@ -213,11 +213,11 @@  discard block
 block discarded – undo
213 213
                     (new Format())
214 214
                         ->setContextualClass(Format::DANGER)
215 215
                         ->setString(language()->getLine('CLI_MAINTENANCE_ALREADY_STARTED', [
216
-                            $maintenanceInfo[ 'mode' ],
217
-                            $maintenanceInfo[ 'datetime' ],
218
-                            date('r', strtotime($maintenanceInfo[ 'datetime' ]) + $maintenanceInfo[ 'lifetime' ]),
219
-                            $maintenanceInfo[ 'title' ],
220
-                            $maintenanceInfo[ 'message' ],
216
+                            $maintenanceInfo['mode'],
217
+                            $maintenanceInfo['datetime'],
218
+                            date('r', strtotime($maintenanceInfo['datetime']) + $maintenanceInfo['lifetime']),
219
+                            $maintenanceInfo['title'],
220
+                            $maintenanceInfo['message'],
221 221
                         ]))
222 222
                         ->setNewLinesAfter(1)
223 223
                 );
Please login to merge, or discard this patch.
src/Cli/Commanders/Make.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
     public function optionPath($path)
98 98
     {
99 99
         $path = str_replace(['\\', '/'], DIRECTORY_SEPARATOR, $path);
100
-        $path = PATH_ROOT . str_replace(PATH_ROOT, '', $path);
100
+        $path = PATH_ROOT.str_replace(PATH_ROOT, '', $path);
101 101
 
102 102
         if (pathinfo($path, PATHINFO_EXTENSION)) {
103 103
             $this->optionFilename(pathinfo($path, PATHINFO_FILENAME));
104 104
             $path = dirname($path);
105 105
         }
106 106
 
107
-        $this->optionPath = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
107
+        $this->optionPath = rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
108 108
     }
109 109
 
110 110
     // ------------------------------------------------------------------------
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     public function optionFilename($name)
118 118
     {
119 119
         $name = str_replace('.php', '', $name);
120
-        $this->optionFilename = prepare_filename($name) . '.php';
120
+        $this->optionFilename = prepare_filename($name).'.php';
121 121
 
122 122
         $this->optionPath = empty($this->optionPath) ? modules()->current()->getRealPath() : $this->optionPath;
123 123
     }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     public function getPhpTemplateFile($filename)
157 157
     {
158 158
         $directories = [
159
-            PATH_FRAMEWORK . 'Config' . DIRECTORY_SEPARATOR . 'PhpTemplateFiles',
159
+            PATH_FRAMEWORK.'Config'.DIRECTORY_SEPARATOR.'PhpTemplateFiles',
160 160
         ];
161 161
 
162 162
     }
Please login to merge, or discard this patch.
src/Services/Loader.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     public function addNamespace($namespace, $baseDirectory, $prepend = false)
115 115
     {
116 116
         // normalize namespace prefix
117
-        $namespace = trim($namespace, '\\') . '\\';
117
+        $namespace = trim($namespace, '\\').'\\';
118 118
 
119 119
         if (empty($namespace) OR $namespace === '\\') {
120 120
             return;
@@ -122,24 +122,24 @@  discard block
 block discarded – undo
122 122
 
123 123
         // normalize the base directory with a trailing separator
124 124
         $baseDirectory = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $baseDirectory);
125
-        $baseDirectory = rtrim($baseDirectory, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
125
+        $baseDirectory = rtrim($baseDirectory, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
126 126
 
127 127
         if (is_dir($baseDirectory)) {
128 128
             // initialize the namespace prefix array
129
-            if (isset($this->namespaceDirs[ $namespace ]) === false) {
130
-                $this->namespaceDirs[ $namespace ] = [];
129
+            if (isset($this->namespaceDirs[$namespace]) === false) {
130
+                $this->namespaceDirs[$namespace] = [];
131 131
             }
132 132
 
133 133
             // retain the base directory for the namespace prefix
134
-            if ( ! in_array($baseDirectory, $this->namespaceDirs[ $namespace ])) {
134
+            if (!in_array($baseDirectory, $this->namespaceDirs[$namespace])) {
135 135
                 if ($prepend) {
136
-                    array_unshift($this->namespaceDirs[ $namespace ], $baseDirectory);
136
+                    array_unshift($this->namespaceDirs[$namespace], $baseDirectory);
137 137
                 } else {
138
-                    array_push($this->namespaceDirs[ $namespace ], $baseDirectory);
138
+                    array_push($this->namespaceDirs[$namespace], $baseDirectory);
139 139
                 }
140 140
             }
141 141
 
142
-            $this->namespaceDirsMap[ $baseDirectory ] = $namespace;
142
+            $this->namespaceDirsMap[$baseDirectory] = $namespace;
143 143
 
144 144
             // Register Namespace Language
145 145
             language()->addFilePath($baseDirectory);
@@ -148,8 +148,8 @@  discard block
 block discarded – undo
148 148
             output()->addFilePath($baseDirectory);
149 149
 
150 150
             // Autoload Composer
151
-            if (is_file($baseDirectory . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php')) {
152
-                require($baseDirectory . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php');
151
+            if (is_file($baseDirectory.'vendor'.DIRECTORY_SEPARATOR.'autoload.php')) {
152
+                require($baseDirectory.'vendor'.DIRECTORY_SEPARATOR.'autoload.php');
153 153
             }
154 154
         }
155 155
     }
@@ -170,10 +170,10 @@  discard block
 block discarded – undo
170 170
         $dir = str_replace(['\\', '/'], DIRECTORY_SEPARATOR, $dir);
171 171
 
172 172
         $dir = realpath($dir);
173
-        $dir = rtrim($dir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
173
+        $dir = rtrim($dir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
174 174
 
175 175
         if (array_key_exists($dir, $this->namespaceDirsMap)) {
176
-            return $this->namespaceDirsMap[ $dir ];
176
+            return $this->namespaceDirsMap[$dir];
177 177
         }
178 178
 
179 179
         return false;
@@ -211,10 +211,10 @@  discard block
 block discarded – undo
211 211
      */
212 212
     public function getNamespaceDirs($namespace)
213 213
     {
214
-        $namespace = trim($namespace, '\\') . '\\';
214
+        $namespace = trim($namespace, '\\').'\\';
215 215
 
216 216
         if (array_key_exists($namespace, $this->namespaceDirs)) {
217
-            return $this->namespaceDirs[ $namespace ];
217
+            return $this->namespaceDirs[$namespace];
218 218
         }
219 219
 
220 220
         return false;
@@ -237,29 +237,29 @@  discard block
 block discarded – undo
237 237
         }
238 238
 
239 239
         if ($this->requireFile($helper)) {
240
-            $this->loadedHelpers[ pathinfo($helper, PATHINFO_FILENAME) ][] = $helper;
240
+            $this->loadedHelpers[pathinfo($helper, PATHINFO_FILENAME)][] = $helper;
241 241
 
242 242
             return;
243 243
         }
244 244
 
245 245
         $helperDirectories = [
246
-            PATH_KERNEL . 'Helpers' . DIRECTORY_SEPARATOR,
247
-            PATH_FRAMEWORK . 'Helpers' . DIRECTORY_SEPARATOR,
248
-            PATH_APP . 'Helpers' . DIRECTORY_SEPARATOR,
246
+            PATH_KERNEL.'Helpers'.DIRECTORY_SEPARATOR,
247
+            PATH_FRAMEWORK.'Helpers'.DIRECTORY_SEPARATOR,
248
+            PATH_APP.'Helpers'.DIRECTORY_SEPARATOR,
249 249
         ];
250 250
         
251
-        if ( ! array_key_exists($helper, $this->loadedHelpers)) {
252
-            $this->loadedHelpers[ $helper ] = [];
251
+        if (!array_key_exists($helper, $this->loadedHelpers)) {
252
+            $this->loadedHelpers[$helper] = [];
253 253
         }
254 254
 
255 255
         foreach ($helperDirectories as $helperDirectory) {
256 256
 
257
-            $helperFilePath = $helperDirectory . studlycase($helper) . '.php';
257
+            $helperFilePath = $helperDirectory.studlycase($helper).'.php';
258 258
 
259
-            if (in_array($helperFilePath, $this->loadedHelpers[ $helper ])) {
259
+            if (in_array($helperFilePath, $this->loadedHelpers[$helper])) {
260 260
                 continue;
261 261
             } elseif ($this->requireFile($helperFilePath)) {
262
-                $this->loadedHelpers[ $helper ][] = $helperFilePath;
262
+                $this->loadedHelpers[$helper][] = $helperFilePath;
263 263
             }
264 264
         }
265 265
     }
@@ -335,12 +335,12 @@  discard block
 block discarded – undo
335 335
     public function loadMappedFile($namespace, $relativeClass)
336 336
     {
337 337
         // are there any base directories for this namespace prefix?
338
-        if (isset($this->namespaceDirs[ $namespace ]) === false) {
338
+        if (isset($this->namespaceDirs[$namespace]) === false) {
339 339
             return false;
340 340
         }
341 341
 
342 342
         // look through base directories for this namespace prefix
343
-        foreach ($this->namespaceDirs[ $namespace ] as $namespaceDirectory) {
343
+        foreach ($this->namespaceDirs[$namespace] as $namespaceDirectory) {
344 344
 
345 345
             // replace the namespace prefix with the base directory,
346 346
             // replace namespace separators with directory separators
Please login to merge, or discard this patch.
src/Http/Middleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
      */
45 45
     public function run()
46 46
     {
47
-        if ( ! empty($this->registry)) {
47
+        if (!empty($this->registry)) {
48 48
 
49 49
             $request = server_request();
50 50
 
Please login to merge, or discard this patch.
src/Reactor.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
126 126
  *
127 127
  * WITH TRAILING SLASH!
128 128
  */
129
-if ( ! defined('PATH_RESOURCES')) {
130
-    define('PATH_RESOURCES', PATH_ROOT . DIR_RESOURCES . DIRECTORY_SEPARATOR);
129
+if (!defined('PATH_RESOURCES')) {
130
+    define('PATH_RESOURCES', PATH_ROOT.DIR_RESOURCES.DIRECTORY_SEPARATOR);
131 131
 }
132 132
 
133 133
 
@@ -136,14 +136,14 @@  discard block
 block discarded – undo
136 136
  * FRAMEWORK CONSTANTS
137 137
  *---------------------------------------------------------------
138 138
  */
139
-require __DIR__ . '/Config/Constants.php';
139
+require __DIR__.'/Config/Constants.php';
140 140
 
141 141
 /*
142 142
  *---------------------------------------------------------------
143 143
  * FRAMEWORK HELPERS
144 144
  *---------------------------------------------------------------
145 145
  */
146
-require __DIR__ . '/Helpers/Reactor.php';
146
+require __DIR__.'/Helpers/Reactor.php';
147 147
 
148 148
 /**
149 149
  * Class Reactor
@@ -265,12 +265,12 @@  discard block
 block discarded – undo
265 265
                 }
266 266
 
267 267
                 if (profiler() !== false) {
268
-                    profiler()->watch('Instantiating Requested Commander: ' . $commander->getClass());
268
+                    profiler()->watch('Instantiating Requested Commander: '.$commander->getClass());
269 269
                 }
270 270
                 $requestCommander = $commander->getInstance();
271 271
 
272 272
                 if (profiler() !== false) {
273
-                    profiler()->watch('Execute Requested Commander: ' . $commander->getClass());
273
+                    profiler()->watch('Execute Requested Commander: '.$commander->getClass());
274 274
                 }
275 275
                 $requestCommander->execute();
276 276
 
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
         }
305 305
         middleware()->run();
306 306
         
307
-        if($this->services->has('controller')) {
307
+        if ($this->services->has('controller')) {
308 308
             $controller = $this->services->get('controller');
309 309
             
310 310
             // Autoload Model
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
             }
316 316
 
317 317
             if (profiler() !== false) {
318
-                profiler()->watch('Instantiating Requested Controller: ' . $controller->getClass());
318
+                profiler()->watch('Instantiating Requested Controller: '.$controller->getClass());
319 319
             }
320 320
             $requestController = $controller->getInstance();
321 321
 
Please login to merge, or discard this patch.
src/Containers/Models.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function __construct()
42 42
     {
43 43
         if ($config = config()->loadFile('database', true)) {
44
-            if ( ! empty($config[ 'default' ][ 'hostname' ]) AND ! empty($config[ 'default' ][ 'username' ])) {
44
+            if (!empty($config['default']['hostname']) AND !empty($config['default']['username'])) {
45 45
 
46 46
                 if (profiler() !== false) {
47 47
                     profiler()->watch('Starting Database Service');
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
         if (isset($service) && $service instanceof SplServiceRegistry) {
76 76
             if (profiler() !== false) {
77
-                profiler()->watch('Load New Model: ' . $service->getClassName());
77
+                profiler()->watch('Load New Model: '.$service->getClassName());
78 78
             }
79 79
 
80 80
             $this->register($service, $offset);
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
                 $this->attach($offset, $service);
104 104
 
105 105
                 if (profiler() !== false) {
106
-                    profiler()->watch('Register New Model: ' . $service->getClassName());
106
+                    profiler()->watch('Register New Model: '.$service->getClassName());
107 107
                 }
108 108
             }
109 109
         }
@@ -120,13 +120,13 @@  discard block
 block discarded – undo
120 120
     public function add($model, $offset = null)
121 121
     {
122 122
         if (is_object($model)) {
123
-            if ( ! $model instanceof SplServiceRegistry) {
123
+            if (!$model instanceof SplServiceRegistry) {
124 124
                 $model = new SplServiceRegistry($model);
125 125
             }
126 126
         }
127 127
 
128 128
         if (profiler() !== false) {
129
-            profiler()->watch('Add New Model: ' . $model->getClassName());
129
+            profiler()->watch('Add New Model: '.$model->getClassName());
130 130
         }
131 131
 
132 132
         $this->register($model, $offset);
Please login to merge, or discard this patch.
src/Containers/Globals.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function offsetExists($offset)
105 105
     {
106
-        return isset($GLOBALS[ $offset ]);
106
+        return isset($GLOBALS[$offset]);
107 107
     }
108 108
 
109 109
     // ------------------------------------------------------------------------
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      */
121 121
     public function &__get($offset)
122 122
     {
123
-        return $GLOBALS[ $offset ];
123
+        return $GLOBALS[$offset];
124 124
     }
125 125
 
126 126
     // ------------------------------------------------------------------------
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      */
179 179
     public function offsetSet($offset, $value)
180 180
     {
181
-        $GLOBALS[ $offset ] = $value;
181
+        $GLOBALS[$offset] = $value;
182 182
     }
183 183
 
184 184
     // ------------------------------------------------------------------------
@@ -233,8 +233,8 @@  discard block
 block discarded – undo
233 233
      */
234 234
     public function offsetUnset($offset)
235 235
     {
236
-        if (isset($GLOBALS[ $offset ])) {
237
-            unset($GLOBALS[ $offset ]);
236
+        if (isset($GLOBALS[$offset])) {
237
+            unset($GLOBALS[$offset]);
238 238
         }
239 239
     }
240 240
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      */
307 307
     public function count()
308 308
     {
309
-        return (int)count($GLOBALS);
309
+        return (int) count($GLOBALS);
310 310
     }
311 311
 
312 312
     // ------------------------------------------------------------------------
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
      */
415 415
     public function has($id)
416 416
     {
417
-        return (bool)$this->offsetExists($id);
417
+        return (bool) $this->offsetExists($id);
418 418
     }
419 419
 
420 420
     // ------------------------------------------------------------------------
@@ -435,6 +435,6 @@  discard block
 block discarded – undo
435 435
      */
436 436
     public function offsetGet($offset)
437 437
     {
438
-        return (isset($GLOBALS[ $offset ])) ? $GLOBALS[ $offset ] : false;
438
+        return (isset($GLOBALS[$offset])) ? $GLOBALS[$offset] : false;
439 439
     }
440 440
 }
441 441
\ No newline at end of file
Please login to merge, or discard this patch.
src/Containers/Environment.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function offsetExists($offset)
105 105
     {
106
-        return isset($_ENV[ $offset ]);
106
+        return isset($_ENV[$offset]);
107 107
     }
108 108
 
109 109
     // ------------------------------------------------------------------------
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      */
121 121
     public function &__get($offset)
122 122
     {
123
-        return $_ENV[ $offset ];
123
+        return $_ENV[$offset];
124 124
     }
125 125
 
126 126
     // ------------------------------------------------------------------------
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      */
179 179
     public function offsetSet($offset, $value)
180 180
     {
181
-        $_ENV[ $offset ] = $value;
181
+        $_ENV[$offset] = $value;
182 182
     }
183 183
 
184 184
     // ------------------------------------------------------------------------
@@ -233,8 +233,8 @@  discard block
 block discarded – undo
233 233
      */
234 234
     public function offsetUnset($offset)
235 235
     {
236
-        if (isset($_ENV[ $offset ])) {
237
-            unset($_ENV[ $offset ]);
236
+        if (isset($_ENV[$offset])) {
237
+            unset($_ENV[$offset]);
238 238
         }
239 239
     }
240 240
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      */
307 307
     public function count()
308 308
     {
309
-        return (int)count($_ENV);
309
+        return (int) count($_ENV);
310 310
     }
311 311
 
312 312
     // ------------------------------------------------------------------------
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
      */
415 415
     public function has($id)
416 416
     {
417
-        return (bool)$this->offsetExists($id);
417
+        return (bool) $this->offsetExists($id);
418 418
     }
419 419
 
420 420
     // ------------------------------------------------------------------------
@@ -435,6 +435,6 @@  discard block
 block discarded – undo
435 435
      */
436 436
     public function offsetGet($offset)
437 437
     {
438
-        return (isset($_ENV[ $offset ])) ? $_ENV[ $offset ] : false;
438
+        return (isset($_ENV[$offset])) ? $_ENV[$offset] : false;
439 439
     }
440 440
 }
441 441
\ No newline at end of file
Please login to merge, or discard this patch.
src/Helpers/Reactor.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
74 74
 
75 75
 // ------------------------------------------------------------------------
76 76
 
77
-if ( ! function_exists('cache')) {
77
+if (!function_exists('cache')) {
78 78
     /**
79 79
      * cache
80 80
      *
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     function cache()
86 86
     {
87
-        if(services()->has('cache')) {
87
+        if (services()->has('cache')) {
88 88
             return services()->get('cache');
89 89
         }
90 90
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
 // ------------------------------------------------------------------------
96 96
 
97
-if ( ! function_exists('database')) {
97
+if (!function_exists('database')) {
98 98
     /**
99 99
      * database
100 100
      *
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 // ------------------------------------------------------------------------
112 112
 
113
-if ( ! function_exists('models')) {
113
+if (!function_exists('models')) {
114 114
     /**
115 115
      * models
116 116
      *
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         $args = func_get_args();
124 124
 
125 125
         if (count($args)) {
126
-            return o2system()->models->get($args[ 0 ]);
126
+            return o2system()->models->get($args[0]);
127 127
         }
128 128
 
129 129
         return o2system()->models;
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
 // ------------------------------------------------------------------------
134 134
 
135
-if ( ! function_exists('router')) {
135
+if (!function_exists('router')) {
136 136
     /**
137 137
      * router
138 138
      *
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      */
143 143
     function router()
144 144
     {
145
-        if(services()->has('router')) {
145
+        if (services()->has('router')) {
146 146
             return services()->get('router');
147 147
         }
148 148
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
 // ------------------------------------------------------------------------
154 154
 
155
-if ( ! function_exists('session')) {
155
+if (!function_exists('session')) {
156 156
     /**
157 157
      * session
158 158
      *
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
         $args = func_get_args();
166 166
 
167 167
         if (count($args)) {
168
-            if(isset($_SESSION[ $args[0] ])) {
169
-                return $_SESSION[ $args[0] ];
168
+            if (isset($_SESSION[$args[0]])) {
169
+                return $_SESSION[$args[0]];
170 170
             }
171 171
 
172 172
             return null;
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
 // ------------------------------------------------------------------------
180 180
 
181
-if ( ! function_exists('middleware')) {
181
+if (!function_exists('middleware')) {
182 182
     /**
183 183
      * O2System
184 184
      *
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      */
189 189
     function middleware()
190 190
     {
191
-        if(services()->has('middleware')) {
191
+        if (services()->has('middleware')) {
192 192
             return services()->get('middleware');
193 193
         }
194 194
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 
199 199
 // ------------------------------------------------------------------------
200 200
 
201
-if ( ! function_exists('controller')) {
201
+if (!function_exists('controller')) {
202 202
     /**
203 203
      * controller
204 204
      *
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
      */
209 209
     function controller()
210 210
     {
211
-        if(services()->has('controller')) {
211
+        if (services()->has('controller')) {
212 212
             $args = func_get_args();
213 213
 
214 214
             if (count($args)) {
Please login to merge, or discard this patch.