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 ( a1835d...10e84a )
by
unknown
02:48
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/Traits/ModifierTrait.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
         }
47 47
 
48 48
         if (method_exists($this, 'getRecordOrdering')) {
49
-            if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) {
50
-                $sets[ 'record_ordering' ] = $this->getRecordOrdering($this->table);
49
+            if ($this->recordOrdering === true && empty($sets['record_ordering'])) {
50
+                $sets['record_ordering'] = $this->getRecordOrdering($this->table);
51 51
             }
52 52
         }
53 53
 
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
             foreach ($sets as $set) {
83 83
                 $this->insertRecordSets($set);
84 84
 
85
-                if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) {
86
-                    $set[ 'record_ordering' ] = $this->getRecordOrdering($this->table);
85
+                if ($this->recordOrdering === true && empty($sets['record_ordering'])) {
86
+                    $set['record_ordering'] = $this->getRecordOrdering($this->table);
87 87
                 }
88 88
             }
89 89
         }
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
 
122 122
         if (empty($where)) {
123 123
             if (empty($this->primaryKeys)) {
124
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
124
+                $where[$primaryKey] = $sets[$primaryKey];
125 125
             } else {
126 126
                 foreach ($this->primaryKeys as $primaryKey) {
127
-                    $where[ $primaryKey ] = $sets[ $primaryKey ];
127
+                    $where[$primaryKey] = $sets[$primaryKey];
128 128
                 }
129 129
             }
130 130
         }
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
         }
143 143
 
144 144
         if (method_exists($this, 'getRecordOrdering')) {
145
-            if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) {
146
-                $sets[ 'record_ordering' ] = $this->getRecordOrdering($this->table);
145
+            if ($this->recordOrdering === true && empty($sets['record_ordering'])) {
146
+                $sets['record_ordering'] = $this->getRecordOrdering($this->table);
147 147
             }
148 148
         }
149 149
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
             return $this->db->getLastInsertId();
189 189
         }
190 190
 
191
-        return $result[ 0 ]->id;
191
+        return $result[0]->id;
192 192
     }
193 193
 
194 194
     protected function updateOrInsert(array $sets, array $where = [])
@@ -197,10 +197,10 @@  discard block
 block discarded – undo
197 197
 
198 198
         if (empty($where)) {
199 199
             if (empty($this->primaryKeys)) {
200
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
200
+                $where[$primaryKey] = $sets[$primaryKey];
201 201
             } else {
202 202
                 foreach ($this->primaryKeys as $primaryKey) {
203
-                    $where[ $primaryKey ] = $sets[ $primaryKey ];
203
+                    $where[$primaryKey] = $sets[$primaryKey];
204 204
                 }
205 205
             }
206 206
         }
@@ -227,11 +227,11 @@  discard block
 block discarded – undo
227 227
 
228 228
         $where = [];
229 229
         if (empty($this->primaryKeys)) {
230
-            $where[ $primaryKey ] = $sets[ $primaryKey ];
231
-            $this->qb->where($primaryKey, $sets[ $primaryKey ]);
230
+            $where[$primaryKey] = $sets[$primaryKey];
231
+            $this->qb->where($primaryKey, $sets[$primaryKey]);
232 232
         } else {
233 233
             foreach ($this->primaryKeys as $primaryKey) {
234
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
234
+                $where[$primaryKey] = $sets[$primaryKey];
235 235
             }
236 236
         }
237 237
 
@@ -243,8 +243,8 @@  discard block
 block discarded – undo
243 243
             foreach ($sets as $set) {
244 244
                 $this->updateRecordSets($set);
245 245
 
246
-                if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) {
247
-                    $set[ 'record_ordering' ] = $this->getRecordOrdering($this->table);
246
+                if ($this->recordOrdering === true && empty($sets['record_ordering'])) {
247
+                    $set['record_ordering'] = $this->getRecordOrdering($this->table);
248 248
                 }
249 249
             }
250 250
         }
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         $affectedRows = [];
279 279
 
280 280
         foreach ($ids as $id) {
281
-            $affectedRows[ $id ] = $this->softDelete($id);
281
+            $affectedRows[$id] = $this->softDelete($id);
282 282
         }
283 283
 
284 284
         return $affectedRows;
@@ -301,19 +301,19 @@  discard block
 block discarded – undo
301 301
         $where = [];
302 302
 
303 303
         if (empty($this->primaryKeys)) {
304
-            $where[ $primaryKey ] = $id;
305
-            $sets[ $primaryKey ] = $id;
304
+            $where[$primaryKey] = $id;
305
+            $sets[$primaryKey] = $id;
306 306
         } elseif (is_array($id)) {
307 307
             foreach ($this->primaryKeys as $primaryKey) {
308
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
309
-                $sets[ $primaryKey ] = $id[ $primaryKey ];
308
+                $where[$primaryKey] = $sets[$primaryKey];
309
+                $sets[$primaryKey] = $id[$primaryKey];
310 310
             }
311 311
         } else {
312 312
             foreach ($this->primaryKeys as $primaryKey) {
313
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
313
+                $where[$primaryKey] = $sets[$primaryKey];
314 314
             }
315 315
 
316
-            $sets[ reset($this->primaryKeys) ] = $id;
316
+            $sets[reset($this->primaryKeys)] = $id;
317 317
         }
318 318
 
319 319
         // Reset Primary Keys
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
         $affectedRows = [];
348 348
 
349 349
         foreach ($ids as $id) {
350
-            $affectedRows[ $id ] = $this->softDeleteBy($id, $where);
350
+            $affectedRows[$id] = $this->softDeleteBy($id, $where);
351 351
         }
352 352
 
353 353
         return $affectedRows;
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
         $affectedRows = [];
370 370
 
371 371
         foreach ($ids as $id) {
372
-            $affectedRows[ $id ] = $this->delete($id, $force);
372
+            $affectedRows[$id] = $this->delete($id, $force);
373 373
         }
374 374
 
375 375
         return $affectedRows;
@@ -383,13 +383,13 @@  discard block
 block discarded – undo
383 383
 
384 384
         $where = [];
385 385
         if (empty($this->primaryKeys)) {
386
-            $where[ $primaryKey ] = $id;
386
+            $where[$primaryKey] = $id;
387 387
         } elseif (is_array($id)) {
388 388
             foreach ($this->primaryKeys as $primaryKey) {
389
-                $where[ $primaryKey ] = $id[ $primaryKey ];
389
+                $where[$primaryKey] = $id[$primaryKey];
390 390
             }
391 391
         } else {
392
-            $where[ reset($this->primaryKeys) ] = $id;
392
+            $where[reset($this->primaryKeys)] = $id;
393 393
         }
394 394
 
395 395
         // Reset Primary Keys
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
         $affectedRows = [];
419 419
 
420 420
         foreach ($ids as $id) {
421
-            $affectedRows[ $id ] = $this->deleteBy($id, $where, $force);
421
+            $affectedRows[$id] = $this->deleteBy($id, $where, $force);
422 422
         }
423 423
 
424 424
         return $affectedRows;
@@ -448,19 +448,19 @@  discard block
 block discarded – undo
448 448
         $where = [];
449 449
 
450 450
         if (empty($this->primaryKeys)) {
451
-            $where[ $primaryKey ] = $id;
452
-            $sets[ $primaryKey ] = $id;
451
+            $where[$primaryKey] = $id;
452
+            $sets[$primaryKey] = $id;
453 453
         } elseif (is_array($id)) {
454 454
             foreach ($this->primaryKeys as $primaryKey) {
455
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
456
-                $sets[ $primaryKey ] = $id[ $primaryKey ];
455
+                $where[$primaryKey] = $sets[$primaryKey];
456
+                $sets[$primaryKey] = $id[$primaryKey];
457 457
             }
458 458
         } else {
459 459
             foreach ($this->primaryKeys as $primaryKey) {
460
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
460
+                $where[$primaryKey] = $sets[$primaryKey];
461 461
             }
462 462
 
463
-            $sets[ reset($this->primaryKeys) ] = $id;
463
+            $sets[reset($this->primaryKeys)] = $id;
464 464
         }
465 465
 
466 466
         // Reset Primary Keys
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
         $affectedRows = [];
518 518
 
519 519
         foreach ($ids as $id) {
520
-            $affectedRows[ $id ] = $this->publish($id);
520
+            $affectedRows[$id] = $this->publish($id);
521 521
         }
522 522
 
523 523
         return $affectedRows;
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
         $affectedRows = [];
538 538
 
539 539
         foreach ($ids as $id) {
540
-            $affectedRows[ $id ] = $this->publishBy($id, $where);
540
+            $affectedRows[$id] = $this->publishBy($id, $where);
541 541
         }
542 542
 
543 543
         return $affectedRows;
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/Framework.php 1 patch
Spacing   +8 added lines, -8 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,7 +195,7 @@  discard block
 block discarded – undo
195 195
         $args = func_get_args();
196 196
 
197 197
         if (count($args)) {
198
-            return o2system()->models->get($args[ 0 ]);
198
+            return o2system()->models->get($args[0]);
199 199
         }
200 200
 
201 201
         return o2system()->models;
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
         $args = func_get_args();
218 218
 
219 219
         if (count($args)) {
220
-            return o2system()->modules->getModule($args[ 0 ]);
220
+            return o2system()->modules->getModule($args[0]);
221 221
         }
222 222
 
223 223
         return o2system()->modules;
@@ -259,8 +259,8 @@  discard block
 block discarded – undo
259 259
         $args = func_get_args();
260 260
 
261 261
         if (count($args)) {
262
-            if (isset($_SESSION[ $args[ 0 ] ])) {
263
-                return $_SESSION[ $args[ 0 ] ];
262
+            if (isset($_SESSION[$args[0]])) {
263
+                return $_SESSION[$args[0]];
264 264
             }
265 265
 
266 266
             return null;
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.