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 ( cf9260...b52382 )
by
unknown
03:19
created
src/Models/Options.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -220,16 +220,16 @@  discard block
 block discarded – undo
220 220
         $familyRelationships = [];
221 221
 
222 222
         foreach ([
223
-                     'PARENT',
224
-                     'CHILD',
225
-                     'SPOUSE',
226
-                     'SIBLING',
227
-                     'GRANDPARENTS',
228
-                     'GRANDCHILD',
229
-                     'PARENTS_SIBLING',
230
-                     'SIBLINGS_CHILD',
231
-                     'AUNTS_UNCLES_CHILD',
232
-                 ] as $relationship
223
+                        'PARENT',
224
+                        'CHILD',
225
+                        'SPOUSE',
226
+                        'SIBLING',
227
+                        'GRANDPARENTS',
228
+                        'GRANDCHILD',
229
+                        'PARENTS_SIBLING',
230
+                        'SIBLINGS_CHILD',
231
+                        'AUNTS_UNCLES_CHILD',
232
+                    ] as $relationship
233 233
         ) {
234 234
             $familyRelationships[ $relationship ] = $this->language->getLine($relationship);
235 235
         }
@@ -245,12 +245,12 @@  discard block
 block discarded – undo
245 245
         $statuses = [];
246 246
 
247 247
         foreach ([
248
-                     'PUBLISH',
249
-                     'UNPUBLISH',
250
-                     'DRAFT',
251
-                     'ARCHIVED',
252
-                     'TRASH',
253
-                 ] as $status
248
+                        'PUBLISH',
249
+                        'UNPUBLISH',
250
+                        'DRAFT',
251
+                        'ARCHIVED',
252
+                        'TRASH',
253
+                    ] as $status
254 254
         ) {
255 255
             $statuses[ $status ] = $this->language->getLine($status);
256 256
         }
@@ -269,10 +269,10 @@  discard block
 block discarded – undo
269 269
         $visibilities = [];
270 270
 
271 271
         foreach ([
272
-                     'PUBLIC',
273
-                     'PRIVATE',
274
-                     'MEMBER',
275
-                 ] as $visibility
272
+                        'PUBLIC',
273
+                        'PRIVATE',
274
+                        'MEMBER',
275
+                    ] as $visibility
276 276
         ) {
277 277
             $visibilities[ $visibility ] = $this->language->getLine($visibility);
278 278
         }
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $religions = [];
41 41
 
42 42
         foreach (['ATHEIST', 'HINDU', 'BUDDHA', 'MOSLEM', 'CHRISTIAN', 'CATHOLIC', 'UNDEFINED'] as $religion) {
43
-            $religions[ $religion ] = $this->language->getLine($religion);
43
+            $religions[$religion] = $this->language->getLine($religion);
44 44
         }
45 45
 
46 46
         return $religions;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $genders = [];
55 55
 
56 56
         foreach (['MALE', 'FEMALE', 'UNDEFINED'] as $gender) {
57
-            $genders[ $gender ] = $this->language->getLine($gender);
57
+            $genders[$gender] = $this->language->getLine($gender);
58 58
         }
59 59
 
60 60
         return $genders;
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         $maritals = [];
69 69
 
70 70
         foreach (['SINGLE', 'MARRIED', 'DIVORCED', 'UNDEFINED'] as $marital) {
71
-            $maritals[ $marital ] = $this->language->getLine($marital);
71
+            $maritals[$marital] = $this->language->getLine($marital);
72 72
         }
73 73
 
74 74
         return $maritals;
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $bloodTypes = [];
83 83
 
84 84
         foreach (['A', 'B', 'AB', 'O', 'UNDEFINED'] as $bloodType) {
85
-            $bloodTypes[ $bloodType ] = $this->language->getLine($bloodType);
85
+            $bloodTypes[$bloodType] = $this->language->getLine($bloodType);
86 86
         }
87 87
 
88 88
         return $bloodTypes;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
         for ($i = $start; $i <= $end; $i++) {
107 107
             $time = strtotime($year . 'W' . $week . $i);
108
-            $days[ strtoupper(date('D', $time)) ] = $this->language->getLine(
108
+            $days[strtoupper(date('D', $time))] = $this->language->getLine(
109 109
                 'CAL_' . strtoupper(date($labelFormat, $time)));
110 110
         }
111 111
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             if ($leading) {
127 127
                 $date = strlen($date) == 1 ? '0' . $date : $date;
128 128
             }
129
-            $dates[ $date ] = $date;
129
+            $dates[$date] = $date;
130 130
         }
131 131
 
132 132
         return $dates;
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             if ($leading) {
149 149
                 $month = strlen($month) == 1 ? '0' . $month : $month;
150 150
             }
151
-            $months[ $month ] = $this->language->getLine(strtoupper('CAL_' . date('F',
151
+            $months[$month] = $this->language->getLine(strtoupper('CAL_' . date('F',
152 152
                     strtotime('1-' . $month . '-2000'))));
153 153
         }
154 154
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         $years = [];
167 167
 
168 168
         foreach (range($start, $end) as $year) {
169
-            $years[ $year ] = $year;
169
+            $years[$year] = $year;
170 170
         }
171 171
 
172 172
         return $years;
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $identities = [];
181 181
 
182 182
         foreach (['UNDEFINED', 'IDENTITY_CARD', 'STUDENT_CARD', 'DRIVER_LICENSE', 'PASSPORT'] as $identity) {
183
-            $identities[ $identity ] = $this->language->getLine($identity);
183
+            $identities[$identity] = $this->language->getLine($identity);
184 184
         }
185 185
 
186 186
         return $identities;
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     {
194 194
         $sizes = [];
195 195
         foreach (['XS', 'S', 'M', 'L', 'XL', 'XXL', 'XXXL'] as $size) {
196
-            $sizes[ $size ] = $size;
196
+            $sizes[$size] = $size;
197 197
         }
198 198
 
199 199
         return $sizes;
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     {
207 207
         $boolean = [];
208 208
         foreach (['YES', 'NO'] as $bool) {
209
-            $boolean[ $bool ] = $this->language->getLine('BOOL_' . $bool);
209
+            $boolean[$bool] = $this->language->getLine('BOOL_' . $bool);
210 210
         }
211 211
 
212 212
         return $boolean;
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
                      'AUNTS_UNCLES_CHILD',
232 232
                  ] as $relationship
233 233
         ) {
234
-            $familyRelationships[ $relationship ] = $this->language->getLine($relationship);
234
+            $familyRelationships[$relationship] = $this->language->getLine($relationship);
235 235
         }
236 236
 
237 237
         return $familyRelationships;
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
                      'TRASH',
253 253
                  ] as $status
254 254
         ) {
255
-            $statuses[ $status ] = $this->language->getLine($status);
255
+            $statuses[$status] = $this->language->getLine($status);
256 256
         }
257 257
 
258 258
         return $statuses;
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
                      'MEMBER',
275 275
                  ] as $visibility
276 276
         ) {
277
-            $visibilities[ $visibility ] = $this->language->getLine($visibility);
277
+            $visibilities[$visibility] = $this->language->getLine($visibility);
278 278
         }
279 279
 
280 280
         return $visibilities;
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
         $languages = [];
293 293
 
294 294
         foreach ($this->language->getRegistry() as $language) {
295
-            $languages[ $language->getParameter() ] = $language->getProperties()->name;
295
+            $languages[$language->getParameter()] = $language->getProperties()->name;
296 296
         }
297 297
 
298 298
         return $languages;
Please login to merge, or discard this patch.
src/Models/Sql/DataObjects/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
             $ormResult = new \SplFixedArray($result->count());
46 46
 
47 47
             foreach ($result as $key => $row) {
48
-                $ormResult[ $key ] = new Result\Row($row, $model);
48
+                $ormResult[$key] = new Result\Row($row, $model);
49 49
             }
50 50
 
51 51
             parent::__construct($ormResult->toArray());
Please login to merge, or discard this patch.
src/Models/Files/Model.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             }
72 72
 
73 73
             $first = reset($this->storage);
74
-            if ( ! isset($first[ $this->primaryKey ])) {
74
+            if ( ! isset($first[$this->primaryKey])) {
75 75
                 $keys = $first->getKeys();
76 76
                 $this->primaryKey = reset($keys);
77 77
             }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function get($property)
91 91
     {
92
-        if (empty($get[ $property ])) {
92
+        if (empty($get[$property])) {
93 93
             if (services()->has($property)) {
94 94
                 return services()->get($property);
95 95
             } elseif (array_key_exists($property, $this->validSubModels)) {
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     final protected function loadSubModel($model)
115 115
     {
116
-        if (is_file($this->validSubModels[ $model ])) {
116
+        if (is_file($this->validSubModels[$model])) {
117 117
             $className = '\\' . get_called_class() . '\\' . ucfirst($model);
118 118
             $className = str_replace('\Base\\Model', '\Models', $className);
119 119
 
Please login to merge, or discard this patch.
src/Helpers/Url.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
             ->withQuery('');
27 27
 
28 28
         if ($uriConfig = config()->offsetGet('uri')) {
29
-            if ( ! empty($uriConfig[ 'base' ])) {
29
+            if ( ! empty($uriConfig['base'])) {
30 30
                 $base = (is_https() ? 'https' : 'http') . '://' . str_replace(['http://', 'https://'], '',
31
-                        $uriConfig[ 'base' ]);
31
+                        $uriConfig['base']);
32 32
                 $uri = new \O2System\Kernel\Http\Message\Uri($base);
33 33
             }
34 34
         }
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
             ->withQuery('');
65 65
 
66 66
         if ($uriConfig = config()->offsetGet('uri')) {
67
-            if ( ! empty($uriConfig[ 'base' ])) {
67
+            if ( ! empty($uriConfig['base'])) {
68 68
                 $base = (is_https() ? 'https' : 'http') . '://' . str_replace(['http://', 'https://'], '',
69
-                        $uriConfig[ 'base' ]);
69
+                        $uriConfig['base']);
70 70
                 $uri = new \O2System\Kernel\Http\Message\Uri($base);
71 71
             }
72 72
         }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 
197 197
         $url = parse_url($uri);
198 198
 
199
-        if ( ! $url or ! isset($url[ 'scheme' ])) {
199
+        if ( ! $url or ! isset($url['scheme'])) {
200 200
             return (is_https() ? 'https://' : 'http://') . $uri;
201 201
         }
202 202
 
@@ -232,15 +232,15 @@  discard block
 block discarded – undo
232 232
         }
233 233
 
234 234
         // IIS environment likely? Use 'refresh' for better compatibility
235
-        if ($method === 'auto' && isset($_SERVER[ 'SERVER_SOFTWARE' ]) && strpos(
236
-                $_SERVER[ 'SERVER_SOFTWARE' ],
235
+        if ($method === 'auto' && isset($_SERVER['SERVER_SOFTWARE']) && strpos(
236
+                $_SERVER['SERVER_SOFTWARE'],
237 237
                 'Microsoft-IIS'
238 238
             ) !== false
239 239
         ) {
240 240
             $method = 'refresh';
241 241
         } elseif ($method !== 'refresh' && (empty($code) OR ! is_numeric($code))) {
242
-            if (isset($_SERVER[ 'SERVER_PROTOCOL' ], $_SERVER[ 'REQUEST_METHOD' ]) && $_SERVER[ 'SERVER_PROTOCOL' ] === 'HTTP/1.1') {
243
-                $code = ($_SERVER[ 'REQUEST_METHOD' ] !== 'GET')
242
+            if (isset($_SERVER['SERVER_PROTOCOL'], $_SERVER['REQUEST_METHOD']) && $_SERVER['SERVER_PROTOCOL'] === 'HTTP/1.1') {
243
+                $code = ($_SERVER['REQUEST_METHOD'] !== 'GET')
244 244
                     ? 303    // reference: http://en.wikipedia.org/wiki/Post/Redirect/Get
245 245
                     : 307;
246 246
             } else {
Please login to merge, or discard this patch.
src/Cli/Commanders/Make/Module.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             exit(EXIT_ERROR);
101 101
         }
102 102
 
103
-        $jsonProperties[ 'name' ] = readable(
103
+        $jsonProperties['name'] = readable(
104 104
             pathinfo($modulePath, PATHINFO_FILENAME),
105 105
             true
106 106
         );
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
                 ) . '\\';
114 114
         } else {
115 115
             $namespace = $this->namespace;
116
-            $jsonProperties[ 'namespace' ] = rtrim($namespace, '\\') . '\\';
116
+            $jsonProperties['namespace'] = rtrim($namespace, '\\') . '\\';
117 117
         }
118 118
 
119
-        $jsonProperties[ 'created' ] = date('d M Y');
119
+        $jsonProperties['created'] = date('d M Y');
120 120
 
121 121
         loader()->addNamespace($namespace, $modulePath);
122 122
 
Please login to merge, or discard this patch.
src/Libraries/Ui/Admin/Sidebar/Menu.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@
 block discarded – undo
38 38
     {
39 39
         parent::__construct('div');
40 40
 
41
-        if (isset($attributes[ 'id' ])) {
42
-            $this->entity->setEntityName($attributes[ 'id' ]);
41
+        if (isset($attributes['id'])) {
42
+            $this->entity->setEntityName($attributes['id']);
43 43
         }
44 44
 
45 45
         if (count($attributes)) {
Please login to merge, or discard this patch.
src/Libraries/Ui/Admin/Sidebar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@
 block discarded – undo
38 38
     {
39 39
         parent::__construct('div');
40 40
 
41
-        if (isset($attributes[ 'id' ])) {
42
-            $this->entity->setEntityName($attributes[ 'id' ]);
41
+        if (isset($attributes['id'])) {
42
+            $this->entity->setEntityName($attributes['id']);
43 43
         }
44 44
 
45 45
         if (count($attributes)) {
Please login to merge, or discard this patch.
src/Services/Loader.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -144,20 +144,20 @@  discard block
 block discarded – undo
144 144
 
145 145
         if (is_dir($baseDirectory)) {
146 146
             // initialize the namespace prefix array
147
-            if (isset($this->namespaceDirs[ $namespace ]) === false) {
148
-                $this->namespaceDirs[ $namespace ] = [];
147
+            if (isset($this->namespaceDirs[$namespace]) === false) {
148
+                $this->namespaceDirs[$namespace] = [];
149 149
             }
150 150
 
151 151
             // retain the base directory for the namespace prefix
152
-            if ( ! in_array($baseDirectory, $this->namespaceDirs[ $namespace ])) {
152
+            if ( ! in_array($baseDirectory, $this->namespaceDirs[$namespace])) {
153 153
                 if ($prepend) {
154
-                    array_unshift($this->namespaceDirs[ $namespace ], $baseDirectory);
154
+                    array_unshift($this->namespaceDirs[$namespace], $baseDirectory);
155 155
                 } else {
156
-                    array_push($this->namespaceDirs[ $namespace ], $baseDirectory);
156
+                    array_push($this->namespaceDirs[$namespace], $baseDirectory);
157 157
                 }
158 158
             }
159 159
 
160
-            $this->namespaceDirsMap[ $baseDirectory ] = $namespace;
160
+            $this->namespaceDirsMap[$baseDirectory] = $namespace;
161 161
 
162 162
             // Register Namespace Language
163 163
             language()->addFilePath($baseDirectory);
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
 
197 197
         if (is_dir($publicDir) and ! in_array($publicDir, $this->publicDirs)) {
198 198
             if (isset($offset)) {
199
-                $this->publicDirs[ $offset ] = $publicDir;
199
+                $this->publicDirs[$offset] = $publicDir;
200 200
             } else {
201
-                $this->publicDirs[ rtrim(str_replace(PATH_PUBLIC, '', $publicDir), '/') ] = $publicDir;
201
+                $this->publicDirs[rtrim(str_replace(PATH_PUBLIC, '', $publicDir), '/')] = $publicDir;
202 202
             }
203 203
         }
204 204
     }
@@ -222,9 +222,9 @@  discard block
 block discarded – undo
222 222
 
223 223
         if (is_dir($resourcesDir) and ! in_array($resourcesDir, $this->resourcesDirs)) {
224 224
             if (isset($offset)) {
225
-                $this->resourcesDirs[ $offset ] = $resourcesDir;
225
+                $this->resourcesDirs[$offset] = $resourcesDir;
226 226
             } else {
227
-                $this->resourcesDirs[ rtrim(str_replace(PATH_RESOURCES, '', $resourcesDir), '/') ] = $resourcesDir;
227
+                $this->resourcesDirs[rtrim(str_replace(PATH_RESOURCES, '', $resourcesDir), '/')] = $resourcesDir;
228 228
             }
229 229
         }
230 230
     }
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
         $dir = rtrim($dir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
283 283
 
284 284
         if (array_key_exists($dir, $this->namespaceDirsMap)) {
285
-            return $this->namespaceDirsMap[ $dir ];
285
+            return $this->namespaceDirsMap[$dir];
286 286
         }
287 287
 
288 288
         return false;
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
         $namespace = trim($namespace, '\\') . '\\';
328 328
 
329 329
         if (array_key_exists($namespace, $this->namespaceDirs)) {
330
-            return $this->namespaceDirs[ $namespace ];
330
+            return $this->namespaceDirs[$namespace];
331 331
         }
332 332
 
333 333
         return false;
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
             if (false !== ($modules = modules()->getRegistry())) {
349 349
                 foreach ($modules as $module) {
350 350
                     if ($module instanceof Module) {
351
-                        if (empty($this->namespaceDirs[ $module->getNamespace() ])) {
351
+                        if (empty($this->namespaceDirs[$module->getNamespace()])) {
352 352
                             $this->addNamespace($module->getNamespace(), $module->getRealPath());
353 353
                         }
354 354
                     }
@@ -416,12 +416,12 @@  discard block
 block discarded – undo
416 416
     public function loadMappedFile($namespace, $relativeClass)
417 417
     {
418 418
         // are there any base directories for this namespace prefix?
419
-        if (isset($this->namespaceDirs[ $namespace ]) === false) {
419
+        if (isset($this->namespaceDirs[$namespace]) === false) {
420 420
             return false;
421 421
         }
422 422
 
423 423
         // look through base directories for this namespace prefix
424
-        foreach ($this->namespaceDirs[ $namespace ] as $namespaceDirectory) {
424
+        foreach ($this->namespaceDirs[$namespace] as $namespaceDirectory) {
425 425
 
426 426
             // replace the namespace prefix with the base directory,
427 427
             // replace namespace separators with directory separators
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
         }
505 505
 
506 506
         if ($this->requireFile($helper)) {
507
-            $this->loadedHelpers[ pathinfo($helper, PATHINFO_FILENAME) ][] = $helper;
507
+            $this->loadedHelpers[pathinfo($helper, PATHINFO_FILENAME)][] = $helper;
508 508
 
509 509
             return;
510 510
         }
@@ -520,17 +520,17 @@  discard block
 block discarded – undo
520 520
         }
521 521
 
522 522
         if ( ! array_key_exists($helper, $this->loadedHelpers)) {
523
-            $this->loadedHelpers[ $helper ] = [];
523
+            $this->loadedHelpers[$helper] = [];
524 524
         }
525 525
 
526 526
         foreach ($helperDirectories as $helperDirectory) {
527 527
 
528 528
             $helperFilePath = $helperDirectory . studlycase($helper) . '.php';
529 529
 
530
-            if (in_array($helperFilePath, $this->loadedHelpers[ $helper ])) {
530
+            if (in_array($helperFilePath, $this->loadedHelpers[$helper])) {
531 531
                 continue;
532 532
             } elseif ($this->requireFile($helperFilePath)) {
533
-                $this->loadedHelpers[ $helper ][] = $helperFilePath;
533
+                $this->loadedHelpers[$helper][] = $helperFilePath;
534 534
             }
535 535
         }
536 536
     }
Please login to merge, or discard this patch.
src/Http/Controllers/Resources.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
         $download = false;
71 71
         if (false !== ($key = array_search('download', $segments))) {
72 72
             $download = true;
73
-            unset($segments[ $key ]);
73
+            unset($segments[$key]);
74 74
             $segments = array_values($segments);
75 75
         }
76 76
 
Please login to merge, or discard this patch.