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 ( 9449cf...4032bb )
by Steeven
02:31
created
src/Http/Output.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     {
33 33
         parent::__construct();
34 34
 
35
-        if(services()->has('csrfProtection')) {
35
+        if (services()->has('csrfProtection')) {
36 36
             $this->addHeader('X-CSRF-TOKEN', services()->get('csrfProtection')->getToken());
37 37
         }
38 38
     }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         $error = new ErrorException($errorMessage, $errorSeverity, $errorFile, $errorLine, $errorContext);
149 149
 
150 150
         // Logged the error
151
-        if(services()->has('logger')) {
151
+        if (services()->has('logger')) {
152 152
             logger()->error(
153 153
                 implode(
154 154
                     ' ',
@@ -301,21 +301,21 @@  discard block
 block discarded – undo
301 301
         ];
302 302
 
303 303
         $this->statusCode = $code;
304
-        $this->reasonPhrase = $error[ 'title' ];
304
+        $this->reasonPhrase = $error['title'];
305 305
 
306 306
         if (is_string($vars)) {
307 307
             $vars = ['message' => $vars];
308
-        } elseif (is_array($vars) and empty($vars[ 'message' ])) {
309
-            $vars[ 'message' ] = $error[ 'message' ];
308
+        } elseif (is_array($vars) and empty($vars['message'])) {
309
+            $vars['message'] = $error['message'];
310 310
         }
311 311
 
312
-        if (isset($vars[ 'message' ])) {
313
-            $error[ 'message' ] = $vars[ 'message' ];
312
+        if (isset($vars['message'])) {
313
+            $error['message'] = $vars['message'];
314 314
         }
315 315
 
316 316
         if (is_ajax() or $this->mimeType !== 'text/html') {
317 317
             $this->statusCode = $code;
318
-            $this->reasonPhrase = $error[ 'title' ];
318
+            $this->reasonPhrase = $error['title'];
319 319
             $this->send($vars);
320 320
 
321 321
             exit(EXIT_ERROR);
Please login to merge, or discard this patch.
src/Http/Presenter/Assets/Positions/Head.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -193,11 +193,11 @@  discard block
 block discarded – undo
193 193
             $bundleFontsFile = $this->bundleFile('assets' . DIRECTORY_SEPARATOR . 'fonts.css',
194 194
                 implode(PHP_EOL, $this->fonts));
195 195
 
196
-            if (is_file($bundleFontsFile[ 'filePath' ])) {
196
+            if (is_file($bundleFontsFile['filePath'])) {
197 197
                 if (input()->env('DEBUG_STAGE') === 'PRODUCTION') {
198
-                    $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleFontsFile[ 'url' ] . '?v=' . $bundleFontsFile[ 'version' ] . '">';
198
+                    $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleFontsFile['url'] . '?v=' . $bundleFontsFile['version'] . '">';
199 199
                 } else {
200
-                    $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleFontsFile[ 'url' ] . '?v=' . $bundleFontsFile[ 'version' ] . '">';
200
+                    $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleFontsFile['url'] . '?v=' . $bundleFontsFile['version'] . '">';
201 201
                 }
202 202
             }
203 203
         }
@@ -233,11 +233,11 @@  discard block
 block discarded – undo
233 233
                 } elseif (in_array(pathinfo($style, PATHINFO_FILENAME), ['module', 'module.min'])) {
234 234
                     $modulePublicFile = $this->publishFile($style);
235 235
                     
236
-                    if (is_file($modulePublicFile[ 'filePath' ])) {
236
+                    if (is_file($modulePublicFile['filePath'])) {
237 237
                         if (input()->env('DEBUG_STAGE') === 'PRODUCTION') {
238
-                            $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $modulePublicFile[ 'minify' ][ 'url' ] . '?v=' . $modulePublicFile[ 'version' ] . '">';
238
+                            $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $modulePublicFile['minify']['url'] . '?v=' . $modulePublicFile['version'] . '">';
239 239
                         } else {
240
-                            $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $modulePublicFile[ 'url' ] . '?v=' . $modulePublicFile[ 'version' ] . '">';
240
+                            $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $modulePublicFile['url'] . '?v=' . $modulePublicFile['version'] . '">';
241 241
                         }
242 242
                     }
243 243
                 } else {
@@ -248,11 +248,11 @@  discard block
 block discarded – undo
248 248
             if (count($bundleStyleSources)) {
249 249
                 $bundleStylePublicFile = $this->bundleFile($bundleFilename . '.css', $bundleStyleSources);
250 250
 
251
-                if (is_file($bundleStylePublicFile[ 'filePath' ])) {
251
+                if (is_file($bundleStylePublicFile['filePath'])) {
252 252
                     if (input()->env('DEBUG_STAGE') === 'PRODUCTION') {
253
-                        $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleStylePublicFile[ 'minify' ][ 'url' ] . '?v=' . $bundleStylePublicFile[ 'version' ] . '">';
253
+                        $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleStylePublicFile['minify']['url'] . '?v=' . $bundleStylePublicFile['version'] . '">';
254 254
                     } else {
255
-                        $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleStylePublicFile[ 'url' ] . '?v=' . $bundleStylePublicFile[ 'version' ] . '">';
255
+                        $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleStylePublicFile['url'] . '?v=' . $bundleStylePublicFile['version'] . '">';
256 256
                     }
257 257
                 }
258 258
             }
@@ -265,15 +265,15 @@  discard block
 block discarded – undo
265 265
             foreach ($this->javascripts as $javascript) {
266 266
                 if (in_array(pathinfo($style, PATHINFO_FILENAME), $unbundledFilenames)) {
267 267
                     $fileVersion = $this->getVersion(filemtime($javascript));
268
-                    $output[] = '<script type="text/javascript" id="js-'.pathinfo($javascript, PATHINFO_FILENAME).'" src="' . $this->getUrl($javascript) . '?v=' . $fileVersion . '"></script>';
268
+                    $output[] = '<script type="text/javascript" id="js-' . pathinfo($javascript, PATHINFO_FILENAME) . '" src="' . $this->getUrl($javascript) . '?v=' . $fileVersion . '"></script>';
269 269
                 } elseif (in_array(pathinfo($javascript, PATHINFO_FILENAME), ['module', 'module.min'])) {
270 270
                     $modulePublicFile = $this->publishFile($javascript);
271 271
                     
272
-                    if (is_file($modulePublicFile[ 'filePath' ])) {
272
+                    if (is_file($modulePublicFile['filePath'])) {
273 273
                         if (input()->env('DEBUG_STAGE') === 'PRODUCTION') {
274
-                            $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile[ 'minify' ][ 'url' ] . '?v=' . $modulePublicFile[ 'version' ] . '"></script>';
274
+                            $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile['minify']['url'] . '?v=' . $modulePublicFile['version'] . '"></script>';
275 275
                         } else {
276
-                            $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile[ 'url' ] . '?v=' . $modulePublicFile[ 'version' ] . '"></script>';
276
+                            $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile['url'] . '?v=' . $modulePublicFile['version'] . '"></script>';
277 277
                         }
278 278
                     }
279 279
                 } else {
@@ -284,11 +284,11 @@  discard block
 block discarded – undo
284 284
             if (count($bundleJavascriptSources)) {
285 285
                 $bundleJavascriptPublicFile = $this->bundleFile($bundleFilename . '.js', $bundleJavascriptSources);
286 286
 
287
-                if (is_file($bundleJavascriptPublicFile[ 'filePath' ])) {
287
+                if (is_file($bundleJavascriptPublicFile['filePath'])) {
288 288
                     if (input()->env('DEBUG_STAGE') === 'PRODUCTION') {
289
-                        $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile[ 'minify' ][ 'url' ] . '?v=' . $bundleJavascriptPublicFile[ 'version' ] . '"></script>';
289
+                        $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile['minify']['url'] . '?v=' . $bundleJavascriptPublicFile['version'] . '"></script>';
290 290
                     } else {
291
-                        $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile[ 'url' ] . '?v=' . $bundleJavascriptPublicFile[ 'version' ] . '"></script>';
291
+                        $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile['url'] . '?v=' . $bundleJavascriptPublicFile['version'] . '"></script>';
292 292
                     }
293 293
                 }
294 294
             }
Please login to merge, or discard this patch.
src/Http/Presenter/Assets/Positions/Abstracts/AbstractPosition.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         if (is_file($mapFilePath = $publicFilePath . '.map')) {
174 174
             $mapMetadata = json_decode(file_get_contents($mapFilePath), true);
175 175
             // if the file version is changed delete it first
176
-            if ( ! hash_equals($fileVersion, $mapMetadata[ 'version' ])) {
176
+            if ( ! hash_equals($fileVersion, $mapMetadata['version'])) {
177 177
                 unlink($publicFilePath);
178 178
                 unlink($publicMinifyFilePath);
179 179
                 unlink($mapFilePath);
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
             if ( ! empty($content)) {
267 267
                 $sourcesContent[] = $content;
268 268
             } else {
269
-                unset($sources[ $key ]);
269
+                unset($sources[$key]);
270 270
             }
271 271
         }
272 272
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
             if (is_file($mapFilePath = $publicFilePath . '.map')) {
288 288
                 $mapMetadata = json_decode(file_get_contents($mapFilePath), true);
289 289
                 // if the file version is changed delete it first
290
-                if ( ! hash_equals($fileVersion, $mapMetadata[ 'version' ])) {
290
+                if ( ! hash_equals($fileVersion, $mapMetadata['version'])) {
291 291
                     unlink($publicFilePath);
292 292
                     unlink($publicMinifyFilePath);
293 293
                     unlink($mapFilePath);
Please login to merge, or discard this patch.
src/Http/Presenter/Assets/Positions/Body.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -111,15 +111,15 @@  discard block
 block discarded – undo
111 111
             foreach ($this->javascripts as $javascript) {
112 112
                 if (in_array(pathinfo($javascript, PATHINFO_FILENAME), $unbundledFilenames)) {
113 113
                     $fileVersion = $this->getVersion(filemtime($javascript));
114
-                    $output[] = '<script type="text/javascript" id="js-'.pathinfo($javascript, PATHINFO_FILENAME).'" src="' . $this->getUrl($javascript) . '?v=' . $fileVersion . '"></script>';
114
+                    $output[] = '<script type="text/javascript" id="js-' . pathinfo($javascript, PATHINFO_FILENAME) . '" src="' . $this->getUrl($javascript) . '?v=' . $fileVersion . '"></script>';
115 115
                 } elseif (in_array(pathinfo($javascript, PATHINFO_FILENAME), ['module', 'module.min'])) {
116 116
                     $modulePublicFile = $this->publishFile($javascript);
117 117
 
118
-                    if (is_file($modulePublicFile[ 'filePath' ])) {
118
+                    if (is_file($modulePublicFile['filePath'])) {
119 119
                         if (input()->env('DEBUG_STAGE') === 'PRODUCTION') {
120
-                            $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile[ 'minify' ][ 'url' ] . '?v=' . $modulePublicFile[ 'version' ] . '"></script>';
120
+                            $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile['minify']['url'] . '?v=' . $modulePublicFile['version'] . '"></script>';
121 121
                         } else {
122
-                            $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile[ 'url' ] . '?v=' . $modulePublicFile[ 'version' ] . '"></script>';
122
+                            $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile['url'] . '?v=' . $modulePublicFile['version'] . '"></script>';
123 123
                         }
124 124
                     }
125 125
                 } else {
@@ -130,11 +130,11 @@  discard block
 block discarded – undo
130 130
             if (count($bundleJavascriptSources)) {
131 131
                 $bundleJavascriptPublicFile = $this->bundleFile($bundleFilename . '.js', $bundleJavascriptSources);
132 132
 
133
-                if (is_file($bundleJavascriptPublicFile[ 'filePath' ])) {
133
+                if (is_file($bundleJavascriptPublicFile['filePath'])) {
134 134
                     if (input()->env('DEBUG_STAGE') === 'PRODUCTION') {
135
-                        $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile[ 'minify' ][ 'url' ] . '?v=' . $bundleJavascriptPublicFile[ 'version' ] . '"></script>';
135
+                        $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile['minify']['url'] . '?v=' . $bundleJavascriptPublicFile['version'] . '"></script>';
136 136
                     } else {
137
-                        $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile[ 'url' ] . '?v=' . $bundleJavascriptPublicFile[ 'version' ] . '"></script>';
137
+                        $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile['url'] . '?v=' . $bundleJavascriptPublicFile['version'] . '"></script>';
138 138
                     }
139 139
                 }
140 140
             }
Please login to merge, or discard this patch.
src/Helpers/Framework.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
         $args = func_get_args();
68 68
 
69 69
         if (count($args)) {
70
-            if (isset($GLOBALS[ $args[ 0 ] ])) {
71
-                return $GLOBALS[ $args[ 0 ] ];
70
+            if (isset($GLOBALS[$args[0]])) {
71
+                return $GLOBALS[$args[0]];
72 72
             }
73 73
 
74 74
             return null;
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
         $args = func_get_args();
94 94
 
95 95
         if (count($args)) {
96
-            if (isset($_ENV[ $args[ 0 ] ])) {
97
-                return $_ENV[ $args[ 0 ] ];
96
+            if (isset($_ENV[$args[0]])) {
97
+                return $_ENV[$args[0]];
98 98
             }
99 99
 
100 100
             return null;
@@ -195,9 +195,9 @@  discard block
 block discarded – undo
195 195
         $args = func_get_args();
196 196
 
197 197
         if (count($args) == 1) {
198
-            return o2system()->models->autoload($args[ 0 ]);
198
+            return o2system()->models->autoload($args[0]);
199 199
         } else if (count($args) == 2) {
200
-            return o2system()->models->autoload($args[ 0 ], $args[ 1 ]);
200
+            return o2system()->models->autoload($args[0], $args[1]);
201 201
         }
202 202
 
203 203
         return o2system()->models;
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         $args = func_get_args();
220 220
 
221 221
         if (count($args)) {
222
-            return o2system()->modules->getModule($args[ 0 ]);
222
+            return o2system()->modules->getModule($args[0]);
223 223
         }
224 224
 
225 225
         return o2system()->modules;
@@ -261,8 +261,8 @@  discard block
 block discarded – undo
261 261
         $args = func_get_args();
262 262
 
263 263
         if (count($args)) {
264
-            if (isset($_SESSION[ $args[ 0 ] ])) {
265
-                return $_SESSION[ $args[ 0 ] ];
264
+            if (isset($_SESSION[$args[0]])) {
265
+                return $_SESSION[$args[0]];
266 266
             }
267 267
 
268 268
             return null;
Please login to merge, or discard this patch.
src/Models/Sql/Traits/RecordTrait.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -99,64 +99,64 @@  discard block
 block discarded – undo
99 99
     {
100 100
         $timestamp = $this->unixTimestamp === true ? strtotime(date('Y-m-d H:i:s')) : date('Y-m-d H:i:s');
101 101
 
102
-        if(is_null($this->recordUser)) {
103
-            if(globals()->offsetExists('account')) {
102
+        if (is_null($this->recordUser)) {
103
+            if (globals()->offsetExists('account')) {
104 104
                 $this->setRecordUser(globals()->account->id);
105 105
             }
106 106
         }
107 107
 
108
-        if ( ! isset($sets[ 'record_status' ])) {
109
-            $sets[ 'record_status' ] = $this->recordStatus;
108
+        if ( ! isset($sets['record_status'])) {
109
+            $sets['record_status'] = $this->recordStatus;
110 110
         }
111 111
 
112 112
         if (empty($this->primaryKeys)) {
113 113
             $primaryKey = isset($this->primaryKey) ? $this->primaryKey : 'id';
114 114
 
115
-            if (isset($sets[ $primaryKey ])) {
116
-                if (empty($sets[ $primaryKey ])) {
117
-                    unset($sets[ $primaryKey ]);
115
+            if (isset($sets[$primaryKey])) {
116
+                if (empty($sets[$primaryKey])) {
117
+                    unset($sets[$primaryKey]);
118 118
                 }
119 119
             }
120 120
 
121
-            if (empty($sets[ $primaryKey ])) {
122
-                if ( ! isset($sets[ 'record_create_user' ])) {
123
-                    $sets[ 'record_create_user' ] = $this->recordUser;
121
+            if (empty($sets[$primaryKey])) {
122
+                if ( ! isset($sets['record_create_user'])) {
123
+                    $sets['record_create_user'] = $this->recordUser;
124 124
                 }
125 125
 
126
-                if ( ! isset($sets[ 'record_create_timestamp' ])) {
127
-                    $sets[ 'record_create_timestamp' ] = $timestamp;
126
+                if ( ! isset($sets['record_create_timestamp'])) {
127
+                    $sets['record_create_timestamp'] = $timestamp;
128 128
                 } elseif ($this->unixTimestamp) {
129
-                    $sets[ 'record_create_timestamp' ] = strtotime($sets[ 'record_create_timestamp' ]);
129
+                    $sets['record_create_timestamp'] = strtotime($sets['record_create_timestamp']);
130 130
                 }
131 131
             }
132 132
         } else {
133 133
             foreach ($this->primaryKeys as $primaryKey) {
134
-                if (empty($sets[ $primaryKey ])) {
135
-                    if ( ! isset($sets[ 'record_create_user' ])) {
136
-                        $sets[ 'record_create_user' ] = $this->recordUser;
134
+                if (empty($sets[$primaryKey])) {
135
+                    if ( ! isset($sets['record_create_user'])) {
136
+                        $sets['record_create_user'] = $this->recordUser;
137 137
                     }
138 138
 
139
-                    if ( ! isset($sets[ 'record_create_timestamp' ])) {
140
-                        $sets[ 'record_create_timestamp' ] = $timestamp;
139
+                    if ( ! isset($sets['record_create_timestamp'])) {
140
+                        $sets['record_create_timestamp'] = $timestamp;
141 141
                     } elseif ($this->unixTimestamp) {
142
-                        $sets[ 'record_create_timestamp' ] = strtotime($sets[ 'record_create_timestamp' ]);
142
+                        $sets['record_create_timestamp'] = strtotime($sets['record_create_timestamp']);
143 143
                     }
144 144
                 }
145 145
             }
146 146
         }
147 147
 
148
-        if ( ! isset($sets[ 'record_update_user' ])) {
149
-            $sets[ 'record_update_user' ] = $this->recordUser;
148
+        if ( ! isset($sets['record_update_user'])) {
149
+            $sets['record_update_user'] = $this->recordUser;
150 150
         }
151 151
 
152
-        if ( ! isset($sets[ 'record_update_timestamp' ])) {
153
-            $sets[ 'record_update_timestamp' ] = $timestamp;
152
+        if ( ! isset($sets['record_update_timestamp'])) {
153
+            $sets['record_update_timestamp'] = $timestamp;
154 154
         } elseif ($this->unixTimestamp) {
155
-            $sets[ 'record_update_timestamp' ] = strtotime($sets[ 'record_update_timestamp' ]);
155
+            $sets['record_update_timestamp'] = strtotime($sets['record_update_timestamp']);
156 156
         }
157 157
 
158
-        if ( ! isset($sets[ 'record_ordering' ]) && $this->recordOrdering === true) {
159
-            $sets[ 'record_ordering' ] = $this->getRecordOrdering();
158
+        if ( ! isset($sets['record_ordering']) && $this->recordOrdering === true) {
159
+            $sets['record_ordering'] = $this->getRecordOrdering();
160 160
         }
161 161
     }
162 162
 
@@ -169,24 +169,24 @@  discard block
 block discarded – undo
169 169
      */
170 170
     protected function updateRecordSets(array &$sets)
171 171
     {
172
-        if(is_null($this->recordUser)) {
173
-            if(globals()->offsetExists('account')) {
172
+        if (is_null($this->recordUser)) {
173
+            if (globals()->offsetExists('account')) {
174 174
                 $this->setRecordUser(globals()->account->id);
175 175
             }
176 176
         }
177 177
 
178
-        if ( ! isset($sets[ 'record_status' ])) {
179
-            $sets[ 'record_status' ] = $this->recordStatus;
178
+        if ( ! isset($sets['record_status'])) {
179
+            $sets['record_status'] = $this->recordStatus;
180 180
         }
181 181
 
182
-        if ( ! isset($sets[ 'record_update_user' ])) {
183
-            $sets[ 'record_update_user' ] = $this->recordUser;
182
+        if ( ! isset($sets['record_update_user'])) {
183
+            $sets['record_update_user'] = $this->recordUser;
184 184
         }
185 185
 
186 186
         $timestamp = $this->unixTimestamp === true ? strtotime(date('Y-m-d H:i:s')) : date('Y-m-d H:i:s');
187 187
 
188
-        if ( ! isset($sets[ 'record_update_timestamp' ])) {
189
-            $sets[ 'record_update_timestamp' ] = $timestamp;
188
+        if ( ! isset($sets['record_update_timestamp'])) {
189
+            $sets['record_update_timestamp'] = $timestamp;
190 190
         }
191 191
     }
192 192
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
      */
200 200
     public function getRecordOrdering()
201 201
     {
202
-        if($this->recordOrdering === true) {
202
+        if ($this->recordOrdering === true) {
203 203
             return $this->qb->countAllResults($this->table) + 1;
204 204
         }
205 205
 
Please login to merge, or discard this patch.
src/Http/Controllers/ServiceWorker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function index()
30 30
     {
31
-        if($javascript = file_get_contents(PATH_PUBLIC . 'assets/sw.js')) {
31
+        if ($javascript = file_get_contents(PATH_PUBLIC . 'assets/sw.js')) {
32 32
             $javascript = str_replace(['{{$theme}}', '{{ $theme }}'], 'default', $javascript);
33 33
 
34 34
             header("Content-type: application/x-javascript");
Please login to merge, or discard this patch.
src/Containers/Config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -156,8 +156,8 @@
 block discarded – undo
156 156
      */
157 157
     public function reload()
158 158
     {
159
-        if(count($this->loaded)) {
160
-            foreach($this->loaded as $filename) {
159
+        if (count($this->loaded)) {
160
+            foreach ($this->loaded as $filename) {
161 161
                 $this->loadFile($filename);
162 162
             }
163 163
         }
Please login to merge, or discard this patch.
src/Http/Presenter.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -105,12 +105,12 @@  discard block
 block discarded – undo
105 105
         }
106 106
 
107 107
         // autoload presenter assets
108
-        if (isset($config[ 'assets' ])) {
109
-            $this->assets->autoload($config[ 'assets' ]);
108
+        if (isset($config['assets'])) {
109
+            $this->assets->autoload($config['assets']);
110 110
         }
111 111
 
112 112
         // autoload presenter theme
113
-        if(isset($config['theme'])) {
113
+        if (isset($config['theme'])) {
114 114
             $this->setTheme($config['theme']);
115 115
         }
116 116
 
@@ -128,19 +128,19 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public function setTheme($theme)
130 130
     {
131
-        if($this->theme instanceof Theme) {
131
+        if ($this->theme instanceof Theme) {
132 132
             $this->assets->removeFilePath($this->theme->getRealPath());
133 133
         }
134 134
 
135 135
         if (is_bool($theme)) {
136 136
             $this->theme = false;
137
-        } elseif(($moduleTheme = modules()->top()->getTheme($theme, true)) instanceof Theme) {
137
+        } elseif (($moduleTheme = modules()->top()->getTheme($theme, true)) instanceof Theme) {
138 138
             $this->theme = $moduleTheme;
139
-        } elseif(($appTheme = modules()->first()->getTheme($theme, true)) instanceof Theme) {
139
+        } elseif (($appTheme = modules()->first()->getTheme($theme, true)) instanceof Theme) {
140 140
             $this->theme = $appTheme;
141 141
         }
142 142
 
143
-        if($this->theme) {
143
+        if ($this->theme) {
144 144
             if ( ! defined('PATH_THEME')) {
145 145
                 define('PATH_THEME', $this->theme->getRealPath());
146 146
             }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             // add theme assets directory
149 149
             $this->assets->pushFilePath($this->theme->getRealPath());
150 150
 
151
-            if(is_dir($themeViewPath = $this->theme->getRealPath() . 'views' . DIRECTORY_SEPARATOR)) {
151
+            if (is_dir($themeViewPath = $this->theme->getRealPath() . 'views' . DIRECTORY_SEPARATOR)) {
152 152
 
153 153
                 // add theme view directory
154 154
                 view()->addFilePath($this->theme->getRealPath());
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
 
159 159
                 $modules = modules()->getArrayCopy();
160 160
 
161
-                foreach($modules as $module) {
161
+                foreach ($modules as $module) {
162 162
                     if ( ! in_array($module->getType(), ['KERNEL', 'FRAMEWORK', 'APP'])) {
163 163
                         $moduleResourcesPath = str_replace(PATH_RESOURCES, '', $module->getResourcesDir());
164 164
 
165
-                        if(is_dir($themeViewPath . $moduleResourcesPath)) {
165
+                        if (is_dir($themeViewPath . $moduleResourcesPath)) {
166 166
                             view()->pushFilePath($themeViewPath . $moduleResourcesPath);
167 167
                         }
168 168
                     }
@@ -203,25 +203,25 @@  discard block
 block discarded – undo
203 203
         $storage = $this->storage;
204 204
 
205 205
         // Add Properties
206
-        $storage[ 'meta' ] = $this->meta;
207
-        $storage[ 'page' ] = $this->page;
208
-        $storage[ 'assets' ] = new SplArrayObject([
206
+        $storage['meta'] = $this->meta;
207
+        $storage['page'] = $this->page;
208
+        $storage['assets'] = new SplArrayObject([
209 209
             'head' => $this->assets->getHead(),
210 210
             'body' => $this->assets->getBody(),
211 211
         ]);
212
-        $storage[ 'partials' ] = $this->partials;
213
-        $storage[ 'widgets' ] = $this->widgets;
214
-        $storage[ 'theme' ] = $this->theme;
212
+        $storage['partials'] = $this->partials;
213
+        $storage['widgets'] = $this->widgets;
214
+        $storage['theme'] = $this->theme;
215 215
 
216 216
         // Add Services
217
-        $storage[ 'config' ] = config();
218
-        $storage[ 'language' ] = language();
219
-        $storage[ 'session' ] = session();
220
-        $storage[ 'presenter' ] = presenter();
221
-        $storage[ 'input' ] = input();
217
+        $storage['config'] = config();
218
+        $storage['language'] = language();
219
+        $storage['session'] = session();
220
+        $storage['presenter'] = presenter();
221
+        $storage['input'] = input();
222 222
 
223 223
         if (services()->has('csrfProtection')) {
224
-            $storage[ 'csrfToken' ] = services()->get('csrfProtection')->getToken();
224
+            $storage['csrfToken'] = services()->get('csrfProtection')->getToken();
225 225
         }
226 226
 
227 227
         return $storage;
Please login to merge, or discard this patch.