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 ( 09ff6d...312062 )
by
unknown
02:21
created
src/Helpers/Common.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
         static $_is_php;
26 26
         $version = (string)$version;
27 27
 
28
-        if ( ! isset($_is_php[ $version ])) {
29
-            $_is_php[ $version ] = version_compare(PHP_VERSION, $version, '>=');
28
+        if ( ! isset($_is_php[$version])) {
29
+            $_is_php[$version] = version_compare(PHP_VERSION, $version, '>=');
30 30
         }
31 31
 
32
-        return $_is_php[ $version ];
32
+        return $_is_php[$version];
33 33
     }
34 34
 }
35 35
 
@@ -131,12 +131,12 @@  discard block
 block discarded – undo
131 131
      */
132 132
     function is_https()
133 133
     {
134
-        if ( ! empty($_SERVER[ 'HTTPS' ]) && strtolower($_SERVER[ 'HTTPS' ]) !== 'off') {
134
+        if ( ! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') {
135 135
             return true;
136
-        } elseif (isset($_SERVER[ 'HTTP_X_FORWARDED_PROTO' ]) && $_SERVER[ 'HTTP_X_FORWARDED_PROTO' ] === 'https') {
136
+        } elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
137 137
             return true;
138
-        } elseif ( ! empty($_SERVER[ 'HTTP_FRONT_END_HTTPS' ]) && strtolower(
139
-                $_SERVER[ 'HTTP_FRONT_END_HTTPS' ]
138
+        } elseif ( ! empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower(
139
+                $_SERVER['HTTP_FRONT_END_HTTPS']
140 140
             ) !== 'off'
141 141
         ) {
142 142
             return true;
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
      */
175 175
     function is_ajax()
176 176
     {
177
-        return ( ! empty($_SERVER[ 'HTTP_X_REQUESTED_WITH' ]) && strtolower(
178
-                $_SERVER[ 'HTTP_X_REQUESTED_WITH' ]
177
+        return ( ! empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower(
178
+                $_SERVER['HTTP_X_REQUESTED_WITH']
179 179
             ) === 'xmlhttprequest');
180 180
     }
181 181
 }
@@ -201,11 +201,11 @@  discard block
 block discarded – undo
201 201
         // every control character except newline (dec 10),
202 202
         // carriage return (dec 13) and horizontal tab (dec 09)
203 203
         if ($url_encoded) {
204
-            $non_displayables[] = '/%0[0-8bcef]/';    // url encoded 00-08, 11, 12, 14, 15
205
-            $non_displayables[] = '/%1[0-9a-f]/';    // url encoded 16-31
204
+            $non_displayables[] = '/%0[0-8bcef]/'; // url encoded 00-08, 11, 12, 14, 15
205
+            $non_displayables[] = '/%1[0-9a-f]/'; // url encoded 16-31
206 206
         }
207 207
 
208
-        $non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S';    // 00-08, 11, 12, 14-31, 127
208
+        $non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127
209 209
 
210 210
         do {
211 211
             $str = preg_replace($non_displayables, '', $str, -1, $count);
@@ -286,11 +286,11 @@  discard block
 block discarded – undo
286 286
                 $matches_regex = explode('_', $header_key);
287 287
                 if (count($matches_regex) > 0 and strlen($header_key) > 2) {
288 288
                     foreach ($matches_regex as $match_key => $match_value) {
289
-                        $matches_regex[ $match_key ] = ucfirst($match_value);
289
+                        $matches_regex[$match_key] = ucfirst($match_value);
290 290
                     }
291 291
                     $header_key = implode('-', $matches_regex);
292 292
                 }
293
-                $headers[ $header_key ] = $server_value;
293
+                $headers[$header_key] = $server_value;
294 294
             }
295 295
         }
296 296
 
@@ -310,8 +310,8 @@  discard block
 block discarded – undo
310 310
     function path_to_url($path)
311 311
     {
312 312
         $path = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $path);
313
-        $root_dir = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $_SERVER[ 'DOCUMENT_ROOT' ]);
314
-        $base_dir = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, dirname($_SERVER[ 'SCRIPT_FILENAME' ]));
313
+        $root_dir = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $_SERVER['DOCUMENT_ROOT']);
314
+        $base_dir = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, dirname($_SERVER['SCRIPT_FILENAME']));
315 315
 
316 316
         $root_dir = rtrim($root_dir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
317 317
         $base_dir = rtrim($base_dir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
@@ -326,15 +326,15 @@  discard block
 block discarded – undo
326 326
 
327 327
         $base_url = is_https() ? 'https' : 'http';
328 328
 
329
-        if (isset($_SERVER[ 'HTTP_HOST' ])) {
330
-            $base_url .= '://' . $_SERVER[ 'HTTP_HOST' ];
331
-        } elseif (isset($_SERVER[ 'SERVER_NAME' ])) {
329
+        if (isset($_SERVER['HTTP_HOST'])) {
330
+            $base_url .= '://' . $_SERVER['HTTP_HOST'];
331
+        } elseif (isset($_SERVER['SERVER_NAME'])) {
332 332
 
333 333
             // Add server name
334
-            $base_url .= '://' . $_SERVER[ 'SERVER_NAME' ];
334
+            $base_url .= '://' . $_SERVER['SERVER_NAME'];
335 335
 
336 336
             // Add server port if needed
337
-            $base_url .= $_SERVER[ 'SERVER_PORT' ] !== '80' ? ':' . $_SERVER[ 'SERVER_PORT' ] : '';
337
+            $base_url .= $_SERVER['SERVER_PORT'] !== '80' ? ':' . $_SERVER['SERVER_PORT'] : '';
338 338
         }
339 339
 
340 340
         // Add base path
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 
345 345
         if (defined('PATH_RESOURCES')) {
346 346
             $path_url = str_replace(PATH_RESOURCES, '', $path);
347
-            if(strpos($path, 'resources') !== false) {
347
+            if (strpos($path, 'resources') !== false) {
348 348
                 $path_url = 'resources/' . $path_url; 
349 349
             }
350 350
         } elseif (defined('PATH_PUBLIC')) {
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
         $segments = explode('\\', $class);
423 423
 
424 424
         if (count($segments) > 1) {
425
-            if ($segments[ 0 ] === $segments[ 1 ]) {
425
+            if ($segments[0] === $segments[1]) {
426 426
                 array_shift($segments);
427 427
             }
428 428
         }
@@ -495,27 +495,27 @@  discard block
 block discarded – undo
495 495
         foreach (explode("\n", $raw_headers) as $i => $h) {
496 496
             $h = explode(':', $h, 2);
497 497
 
498
-            if (isset($h[ 1 ])) {
499
-                if ( ! isset($headers[ $h[ 0 ] ])) {
500
-                    $headers[ $h[ 0 ] ] = trim($h[ 1 ]);
501
-                } elseif (is_array($headers[ $h[ 0 ] ])) {
502
-                    $headers[ $h[ 0 ] ] = array_merge($headers[ $h[ 0 ] ], [trim($h[ 1 ])]); // [+]
498
+            if (isset($h[1])) {
499
+                if ( ! isset($headers[$h[0]])) {
500
+                    $headers[$h[0]] = trim($h[1]);
501
+                } elseif (is_array($headers[$h[0]])) {
502
+                    $headers[$h[0]] = array_merge($headers[$h[0]], [trim($h[1])]); // [+]
503 503
                 } else {
504
-                    $headers[ $h[ 0 ] ] = array_merge([$headers[ $h[ 0 ] ]], [trim($h[ 1 ])]); // [+]
504
+                    $headers[$h[0]] = array_merge([$headers[$h[0]]], [trim($h[1])]); // [+]
505 505
                 }
506 506
 
507
-                $key = $h[ 0 ]; // [+]
507
+                $key = $h[0]; // [+]
508 508
             } else // [+]
509 509
             { // [+]
510
-                if (substr($h[ 0 ], 0, 1) == "\t") // [+]
510
+                if (substr($h[0], 0, 1) == "\t") // [+]
511 511
                 {
512
-                    $headers[ $key ] .= "\r\n\t" . trim($h[ 0 ]);
512
+                    $headers[$key] .= "\r\n\t" . trim($h[0]);
513 513
                 } // [+]
514 514
                 elseif ( ! $key) // [+]
515 515
                 {
516
-                    $headers[ 0 ] = trim($h[ 0 ]);
516
+                    $headers[0] = trim($h[0]);
517 517
                 }
518
-                trim($h[ 0 ]); // [+]
518
+                trim($h[0]); // [+]
519 519
             } // [+]
520 520
         }
521 521
 
@@ -733,8 +733,8 @@  discard block
 block discarded – undo
733 733
 
734 734
         $string = null;
735 735
 
736
-        if (isset($errors[ $code ])) {
737
-            $string = $errors[ $code ];
736
+        if (isset($errors[$code])) {
737
+            $string = $errors[$code];
738 738
         }
739 739
 
740 740
         return strtoupper($string);
Please login to merge, or discard this patch.
src/Helpers/Kernel.php 1 patch
Spacing   +14 added lines, -14 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('kernel')) {
13
+if ( ! function_exists('kernel')) {
14 14
     /**
15 15
      * kernel
16 16
      *
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 // ------------------------------------------------------------------------
34 34
 
35 35
 
36
-if (!function_exists('services')) {
36
+if ( ! function_exists('services')) {
37 37
     /**
38 38
      * services
39 39
      *
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
         if (count($args)) {
49 49
             if (kernel()->services->has($args[0])) {
50
-                if(isset($args[1]) and is_array($args[1])) {
50
+                if (isset($args[1]) and is_array($args[1])) {
51 51
                     return kernel()->services->get($args[0], $args[1]);
52 52
                 }
53 53
                 return kernel()->services->get($args[0]);
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 // ------------------------------------------------------------------------
64 64
 
65
-if (!function_exists('profiler')) {
65
+if ( ! function_exists('profiler')) {
66 66
     /**
67 67
      * profiler
68 68
      *
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 // ------------------------------------------------------------------------
80 80
 
81
-if (!function_exists('language')) {
81
+if ( ! function_exists('language')) {
82 82
     /**
83 83
      * language
84 84
      *
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
         if (count($args)) {
94 94
             if (services()->has('language')) {
95
-                $language =& kernel()->services->get('language');
95
+                $language = & kernel()->services->get('language');
96 96
 
97 97
                 return call_user_func_array([&$language, 'getLine'], $args);
98 98
             }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
 // ------------------------------------------------------------------------
108 108
 
109
-if (!function_exists('logger')) {
109
+if ( ! function_exists('logger')) {
110 110
     /**
111 111
      * logger
112 112
      *
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         if (count($args)) {
122 122
             if (services()->has('logger')) {
123
-                $logger =& services('logger');
123
+                $logger = & services('logger');
124 124
 
125 125
                 return call_user_func_array([&$logger, 'log'], $args);
126 126
             }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
 // ------------------------------------------------------------------------
136 136
 
137
-if (!function_exists('shutdown')) {
137
+if ( ! function_exists('shutdown')) {
138 138
     /**
139 139
      * shutdown
140 140
      *
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
 // ------------------------------------------------------------------------
152 152
 
153
-if (!function_exists('input')) {
153
+if ( ! function_exists('input')) {
154 154
     /**
155 155
      * input
156 156
      *
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
 // ------------------------------------------------------------------------
168 168
 
169
-if (!function_exists('output')) {
169
+if ( ! function_exists('output')) {
170 170
     /**
171 171
      * output
172 172
      *
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
 // ------------------------------------------------------------------------
184 184
 
185
-if (!function_exists('server_request')) {
185
+if ( ! function_exists('server_request')) {
186 186
     /**
187 187
      * server_request
188 188
      *
@@ -193,13 +193,13 @@  discard block
 block discarded – undo
193 193
     function server_request()
194 194
     {
195 195
         if (function_exists('o2system')) {
196
-            if (!services()->has('serverRequest')) {
196
+            if ( ! services()->has('serverRequest')) {
197 197
                 services()->load(new \O2System\Kernel\Http\Message\ServerRequest(), 'serverRequest');
198 198
             }
199 199
 
200 200
             return services('serverRequest');
201 201
         } else {
202
-            if (!services()->has('serverRequest')) {
202
+            if ( ! services()->has('serverRequest')) {
203 203
                 services()->load(new \O2System\Kernel\Http\Message\ServerRequest(), 'serverRequest');
204 204
             }
205 205
 
Please login to merge, or discard this patch.
src/Containers/Services.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,27 +34,27 @@  discard block
 block discarded – undo
34 34
     public function load($service, $offset = null)
35 35
     {
36 36
         if (is_string($service)) {
37
-            if(class_exists('O2System\Framework', false)) {
37
+            if (class_exists('O2System\Framework', false)) {
38 38
                 $className = str_replace(
39
-                    ['App\\','App\Kernel\\','O2System\Framework\\','O2System\Kernel\\'],
39
+                    ['App\\', 'App\Kernel\\', 'O2System\Framework\\', 'O2System\Kernel\\'],
40 40
                     '',
41 41
                     $service
42 42
                 );
43 43
 
44
-                foreach(['App\\','App\Kernel\\','O2System\Framework\\','O2System\Kernel\\'] as $namespace) {
44
+                foreach (['App\\', 'App\Kernel\\', 'O2System\Framework\\', 'O2System\Kernel\\'] as $namespace) {
45 45
                     if (class_exists($namespace . $className)) {
46 46
                         $service = $namespace . $className;
47 47
                         break;
48 48
                     }
49 49
                 }
50
-            } elseif(class_exists('O2System\Reactor', false)) {
50
+            } elseif (class_exists('O2System\Reactor', false)) {
51 51
                 $className = str_replace(
52
-                    ['App\\','App\Kernel\\','O2System\Reactor\\','O2System\Kernel\\'],
52
+                    ['App\\', 'App\Kernel\\', 'O2System\Reactor\\', 'O2System\Kernel\\'],
53 53
                     '',
54 54
                     $service
55 55
                 );
56 56
 
57
-                foreach(['App\\','App\Kernel\\','O2System\Reactor\\','O2System\Kernel\\'] as $namespace) {
57
+                foreach (['App\\', 'App\Kernel\\', 'O2System\Reactor\\', 'O2System\Kernel\\'] as $namespace) {
58 58
                     if (class_exists($namespace . $className)) {
59 59
                         $service = $namespace . $className;
60 60
                         break;
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             }
68 68
         }
69 69
 
70
-        if($service instanceof SplServiceRegistry) {
70
+        if ($service instanceof SplServiceRegistry) {
71 71
             if (profiler() !== false) {
72 72
                 profiler()->watch('Load New Service: ' . $service->getClassName());
73 73
             }
Please login to merge, or discard this patch.
src/Http/Router.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -62,15 +62,15 @@  discard block
 block discarded – undo
62 62
         $uriSegments = $this->uri->getSegments()->getParts();
63 63
         $uriString = $this->uri->getSegments()->getString();
64 64
 
65
-        if($this->uri->getSegments()->getTotalParts()) {
66
-            if(strpos(end($uriSegments), '.json') !== false) {
65
+        if ($this->uri->getSegments()->getTotalParts()) {
66
+            if (strpos(end($uriSegments), '.json') !== false) {
67 67
                 output()->setContentType('application/json');
68 68
                 $endSegment = str_replace('.json', '', end($uriSegments));
69 69
                 array_pop($uriSegments);
70 70
                 array_push($uriSegments, $endSegment);
71 71
                 $this->uri = $this->uri->withSegments(new Message\Uri\Segments($uriSegments));
72 72
                 $uriString = $this->uri->getSegments()->getString();
73
-            } elseif(strpos(end($uriSegments), '.xml') !== false) {
73
+            } elseif (strpos(end($uriSegments), '.xml') !== false) {
74 74
                 output()->setContentType('application/xml');
75 75
                 $endSegment = str_replace('.xml', '', end($uriSegments));
76 76
                 array_pop($uriSegments);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             }
81 81
         } else {
82 82
             $uriPath = urldecode(
83
-                parse_url($_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH)
83
+                parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
84 84
             );
85 85
 
86 86
             $uriPathParts = explode('public/', $uriPath);
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
                 );
169 169
             } elseif (preg_match("/([a-zA-Z0-9\\\]+)(@)([a-zA-Z0-9\\\]+)/", $closure, $matches)) {
170 170
                 $this->setController(
171
-                    (new Router\Datastructures\Controller($matches[ 1 ]))
172
-                        ->setRequestMethod($matches[ 3 ]),
171
+                    (new Router\Datastructures\Controller($matches[1]))
172
+                        ->setRequestMethod($matches[3]),
173 173
                     $uriSegments
174 174
                 );
175 175
             } elseif (is_string($closure) && $closure !== '') {
@@ -250,10 +250,10 @@  discard block
 block discarded – undo
250 250
                         $parameters = $controllerMethodParams;
251 251
                     } else {
252 252
                         foreach ($method->getParameters() as $index => $parameter) {
253
-                            if (isset($uriSegments[ $parameter->name ])) {
254
-                                $parameters[ $index ] = $controllerMethodParams[ $parameter->name ];
253
+                            if (isset($uriSegments[$parameter->name])) {
254
+                                $parameters[$index] = $controllerMethodParams[$parameter->name];
255 255
                             } else {
256
-                                $parameters[ $index ] = null;
256
+                                $parameters[$index] = null;
257 257
                             }
258 258
                         }
259 259
                     }
Please login to merge, or discard this patch.
src/Http/Message/Request.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
     public function getClientIpAddress()
56 56
     {
57
-        if($ipAddresses = config()->getItem('ipAddresses')) {
57
+        if ($ipAddresses = config()->getItem('ipAddresses')) {
58 58
             return input()->ipAddress($ipAddresses->proxy);
59 59
         }
60 60
 
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function isAjax()
91 91
     {
92
-        return ( ! empty($_SERVER[ 'HTTP_X_REQUESTED_WITH' ]) &&
93
-            strtolower($_SERVER[ 'HTTP_X_REQUESTED_WITH' ]) === 'xmlhttprequest');
92
+        return ( ! empty($_SERVER['HTTP_X_REQUESTED_WITH']) &&
93
+            strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest');
94 94
     }
95 95
 
96 96
     //--------------------------------------------------------------------
@@ -103,12 +103,12 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function isSecure()
105 105
     {
106
-        if ( ! empty($_SERVER[ 'HTTPS' ]) && strtolower($_SERVER[ 'HTTPS' ]) !== 'off') {
106
+        if ( ! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') {
107 107
             return true;
108
-        } elseif (isset($_SERVER[ 'HTTP_X_FORWARDED_PROTO' ]) && $_SERVER[ 'HTTP_X_FORWARDED_PROTO' ] === 'https') {
108
+        } elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
109 109
             return true;
110
-        } elseif ( ! empty($_SERVER[ 'HTTP_FRONT_END_HTTPS' ]) && strtolower(
111
-                $_SERVER[ 'HTTP_FRONT_END_HTTPS' ]
110
+        } elseif ( ! empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower(
111
+                $_SERVER['HTTP_FRONT_END_HTTPS']
112 112
             ) !== 'off'
113 113
         ) {
114 114
             return true;
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
     public function getTime($format = null)
130 130
     {
131 131
         return isset($format)
132
-            ? date($format, $_SERVER[ 'REQUEST_TIME' ])
133
-            : $_SERVER[ 'REQUEST_TIME' ];
132
+            ? date($format, $_SERVER['REQUEST_TIME'])
133
+            : $_SERVER['REQUEST_TIME'];
134 134
     }
135 135
 
136 136
     //--------------------------------------------------------------------
@@ -212,12 +212,12 @@  discard block
 block discarded – undo
212 212
 
213 213
         $uri = $this->uri;
214 214
 
215
-        if (isset($parseTarget[ 'path' ])) {
216
-            $uri = $this->uri->withPath($parseTarget[ 'path' ]);
215
+        if (isset($parseTarget['path'])) {
216
+            $uri = $this->uri->withPath($parseTarget['path']);
217 217
         }
218 218
 
219
-        if (isset($parseTarget[ 'query' ])) {
220
-            $uri = $this->uri->withPath($parseTarget[ 'query' ]);
219
+        if (isset($parseTarget['query'])) {
220
+            $uri = $this->uri->withPath($parseTarget['query']);
221 221
         }
222 222
 
223 223
         $this->uri = $uri;
Please login to merge, or discard this patch.
src/Services/Language.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -86,13 +86,13 @@  discard block
 block discarded – undo
86 86
             $this->setDefaultLocale(reset($xDefault));
87 87
         }
88 88
 
89
-        if(class_exists('O2System\Framework', false) or class_exists('\O2System\Reactor', false)) {
90
-            if(services()->has('session')) {
89
+        if (class_exists('O2System\Framework', false) or class_exists('\O2System\Reactor', false)) {
90
+            if (services()->has('session')) {
91 91
                 session()->set('language', $this->getDefault());
92 92
             }
93 93
 
94
-            if(count($this->isLoaded)) {
95
-                foreach($this->isLoaded as $fileIndex => $filePath) {
94
+            if (count($this->isLoaded)) {
95
+                foreach ($this->isLoaded as $fileIndex => $filePath) {
96 96
                     unset($this->isLoaded[$fileIndex]);
97 97
                     $this->loadFile($fileIndex);
98 98
                 }
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
         foreach ($filename as $file) {
179 179
             $file = dash($file);
180
-            if(! $this->isLoaded($file)) {
180
+            if ( ! $this->isLoaded($file)) {
181 181
                 if (is_file($file)) {
182 182
                     $this->parseFile($file);
183 183
                 } else {
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
         if ( ! empty($lines)) {
236 236
             $fileIndex = pathinfo($filePath, PATHINFO_FILENAME);
237 237
             $fileIndex = str_replace('_' . $this->getDefault(), '', $fileIndex);
238
-            $this->isLoaded[ $fileIndex ] = $filePath;
238
+            $this->isLoaded[$fileIndex] = $filePath;
239 239
 
240 240
             $this->lines = array_merge($this->lines, $lines);
241 241
         }
@@ -258,9 +258,9 @@  discard block
 block discarded – undo
258 258
         $lineOffset = strtoupper($line);
259 259
 
260 260
         if (empty($context)) {
261
-            $lineContent = isset($this->lines[ $lineOffset ]) ? $this->lines[ $lineOffset ] : $line;
261
+            $lineContent = isset($this->lines[$lineOffset]) ? $this->lines[$lineOffset] : $line;
262 262
         } else {
263
-            $line = isset($this->lines[ $lineOffset ]) ? $this->lines[ $lineOffset ] : $line;
263
+            $line = isset($this->lines[$lineOffset]) ? $this->lines[$lineOffset] : $line;
264 264
             array_unshift($context, $line);
265 265
 
266 266
             $lineContent = @call_user_func_array('sprintf', $context);
Please login to merge, or discard this patch.