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 ( 776629...deac27 )
by
unknown
03:03
created
src/Models/Sql/Relations/Maps/Inverse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         $referenceModel,
31 31
         $foreignKey = null
32 32
     ) {
33
-        $this->currentModel =& $currentModel;
33
+        $this->currentModel = & $currentModel;
34 34
         $this->currentTable = $currentModel->table;
35 35
         $this->currentPrimaryKey = $currentModel->primaryKey;
36 36
 
Please login to merge, or discard this patch.
src/Models/Sql/Traits/ModifierTrait.php 1 patch
Spacing   +38 added lines, -38 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
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     protected function insertOrUpdate(array $sets)
68 68
     {
69 69
         // Try to find
70
-        if($result = $this->qb->from($this->table)->getWhere($sets)) {
70
+        if ($result = $this->qb->from($this->table)->getWhere($sets)) {
71 71
             return $this->update($sets);
72 72
         } else {
73 73
             return $this->insert($sets);
@@ -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
 
@@ -195,10 +195,10 @@  discard block
 block discarded – undo
195 195
 
196 196
         if (empty($where)) {
197 197
             if (empty($this->primaryKeys)) {
198
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
198
+                $where[$primaryKey] = $sets[$primaryKey];
199 199
             } else {
200 200
                 foreach ($this->primaryKeys as $primaryKey) {
201
-                    $where[ $primaryKey ] = $sets[ $primaryKey ];
201
+                    $where[$primaryKey] = $sets[$primaryKey];
202 202
                 }
203 203
             }
204 204
         }
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
         $this->primaryKeys = [];
209 209
 
210 210
         // Try to find
211
-        if($result = $this->qb->from($this->table)->getWhere($where)) {
211
+        if ($result = $this->qb->from($this->table)->getWhere($where)) {
212 212
             return $this->update($sets, $where);
213 213
         } else {
214 214
             return $this->insert($sets);
@@ -225,11 +225,11 @@  discard block
 block discarded – undo
225 225
 
226 226
         $where = [];
227 227
         if (empty($this->primaryKeys)) {
228
-            $where[ $primaryKey ] = $sets[ $primaryKey ];
229
-            $this->qb->where($primaryKey, $sets[ $primaryKey ]);
228
+            $where[$primaryKey] = $sets[$primaryKey];
229
+            $this->qb->where($primaryKey, $sets[$primaryKey]);
230 230
         } else {
231 231
             foreach ($this->primaryKeys as $primaryKey) {
232
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
232
+                $where[$primaryKey] = $sets[$primaryKey];
233 233
             }
234 234
         }
235 235
 
@@ -241,8 +241,8 @@  discard block
 block discarded – undo
241 241
             foreach ($sets as $set) {
242 242
                 $this->updateRecordSets($set);
243 243
 
244
-                if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) {
245
-                    $set[ 'record_ordering' ] = $this->getRecordOrdering($this->table);
244
+                if ($this->recordOrdering === true && empty($sets['record_ordering'])) {
245
+                    $set['record_ordering'] = $this->getRecordOrdering($this->table);
246 246
                 }
247 247
             }
248 248
         }
@@ -279,19 +279,19 @@  discard block
 block discarded – undo
279 279
         $where = [];
280 280
 
281 281
         if (empty($this->primaryKeys)) {
282
-            $where[ $primaryKey ] = $id;
283
-            $sets[ $primaryKey ] = $id;
282
+            $where[$primaryKey] = $id;
283
+            $sets[$primaryKey] = $id;
284 284
         } elseif (is_array($id)) {
285 285
             foreach ($this->primaryKeys as $primaryKey) {
286
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
287
-                $sets[ $primaryKey ] = $id[ $primaryKey ];
286
+                $where[$primaryKey] = $sets[$primaryKey];
287
+                $sets[$primaryKey] = $id[$primaryKey];
288 288
             }
289 289
         } else {
290 290
             foreach ($this->primaryKeys as $primaryKey) {
291
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
291
+                $where[$primaryKey] = $sets[$primaryKey];
292 292
             }
293 293
 
294
-            $sets[ reset($this->primaryKeys) ] = $id;
294
+            $sets[reset($this->primaryKeys)] = $id;
295 295
         }
296 296
 
297 297
         // Reset Primary Keys
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
         $affectedRows = [];
342 342
 
343 343
         foreach ($ids as $id) {
344
-            $affectedRows[ $id ] = $this->softDelete($id);
344
+            $affectedRows[$id] = $this->softDelete($id);
345 345
         }
346 346
 
347 347
         return $affectedRows;
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
         $affectedRows = [];
355 355
 
356 356
         foreach ($ids as $id) {
357
-            $affectedRows[ $id ] = $this->softDeleteBy($id, $where);
357
+            $affectedRows[$id] = $this->softDeleteBy($id, $where);
358 358
         }
359 359
 
360 360
         return $affectedRows;
@@ -368,13 +368,13 @@  discard block
 block discarded – undo
368 368
 
369 369
         $where = [];
370 370
         if (empty($this->primaryKeys)) {
371
-            $where[ $primaryKey ] = $id;
371
+            $where[$primaryKey] = $id;
372 372
         } elseif (is_array($id)) {
373 373
             foreach ($this->primaryKeys as $primaryKey) {
374
-                $where[ $primaryKey ] = $id[ $primaryKey ];
374
+                $where[$primaryKey] = $id[$primaryKey];
375 375
             }
376 376
         } else {
377
-            $where[ reset($this->primaryKeys) ] = $id;
377
+            $where[reset($this->primaryKeys)] = $id;
378 378
         }
379 379
 
380 380
         // Reset Primary Keys
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
         $affectedRows = [];
413 413
 
414 414
         foreach ($ids as $id) {
415
-            $affectedRows[ $id ] = $this->delete($id, $force);
415
+            $affectedRows[$id] = $this->delete($id, $force);
416 416
         }
417 417
 
418 418
         return $affectedRows;
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
         $affectedRows = [];
424 424
 
425 425
         foreach ($ids as $id) {
426
-            $affectedRows[ $id ] = $this->deleteBy($id, $where, $force);
426
+            $affectedRows[$id] = $this->deleteBy($id, $where, $force);
427 427
         }
428 428
 
429 429
         return $affectedRows;
@@ -439,19 +439,19 @@  discard block
 block discarded – undo
439 439
         $where = [];
440 440
 
441 441
         if (empty($this->primaryKeys)) {
442
-            $where[ $primaryKey ] = $id;
443
-            $sets[ $primaryKey ] = $id;
442
+            $where[$primaryKey] = $id;
443
+            $sets[$primaryKey] = $id;
444 444
         } elseif (is_array($id)) {
445 445
             foreach ($this->primaryKeys as $primaryKey) {
446
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
447
-                $sets[ $primaryKey ] = $id[ $primaryKey ];
446
+                $where[$primaryKey] = $sets[$primaryKey];
447
+                $sets[$primaryKey] = $id[$primaryKey];
448 448
             }
449 449
         } else {
450 450
             foreach ($this->primaryKeys as $primaryKey) {
451
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
451
+                $where[$primaryKey] = $sets[$primaryKey];
452 452
             }
453 453
 
454
-            $sets[ reset($this->primaryKeys) ] = $id;
454
+            $sets[reset($this->primaryKeys)] = $id;
455 455
         }
456 456
 
457 457
         // Reset Primary Keys
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
         $affectedRows = [];
495 495
 
496 496
         foreach ($ids as $id) {
497
-            $affectedRows[ $id ] = $this->publish($id);
497
+            $affectedRows[$id] = $this->publish($id);
498 498
         }
499 499
 
500 500
         return $affectedRows;
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
         $affectedRows = [];
508 508
 
509 509
         foreach ($ids as $id) {
510
-            $affectedRows[ $id ] = $this->publishBy($id, $where);
510
+            $affectedRows[$id] = $this->publishBy($id, $where);
511 511
         }
512 512
 
513 513
         return $affectedRows;
Please login to merge, or discard this patch.
src/Models/Sql/Traits/HierarchicalTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                         ]);
86 86
                 }
87 87
 
88
-                $update[ 'id' ] = $row->id;
88
+                $update['id'] = $row->id;
89 89
 
90 90
                 if ($this->hasChilds($row->id)) {
91 91
                     $right = $this->rebuildTree($row->id, $right, $depth + 1);
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                         ->update($update = [
96 96
                             'record_right' => $right,
97 97
                         ]);
98
-                    $update[ 'id' ] = $row->id;
98
+                    $update['id'] = $row->id;
99 99
                 }
100 100
 
101 101
                 $i++;
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     {
194 194
         $childs = [];
195 195
 
196
-        if($result = $this->qb
196
+        if ($result = $this->qb
197 197
             ->table($this->table)
198 198
             ->where('id_parent', $idParent)
199 199
             ->get()) {
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
      */
222 222
     protected function getNumChilds($idParent)
223 223
     {
224
-        if($result = $this->qb
224
+        if ($result = $this->qb
225 225
             ->table($this->table)
226 226
             ->select('id')
227 227
             ->where('id_parent', $idParent)
Please login to merge, or discard this patch.
src/Models/Sql/Model.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                 if ($filepath === $filePath) {
164 164
                     continue;
165 165
                 }
166
-                $this->validSubModels[ camelcase(pathinfo($filepath, PATHINFO_FILENAME)) ] = $filepath;
166
+                $this->validSubModels[camelcase(pathinfo($filepath, PATHINFO_FILENAME))] = $filepath;
167 167
             }
168 168
         }
169 169
     }
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
             }
211 211
         }
212 212
 
213
-        if (empty($get[ $property ])) {
213
+        if (empty($get[$property])) {
214 214
             if (services()->has($property)) {
215 215
                 return services()->get($property);
216 216
             } elseif ($this->hasSubModel($property)) {
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
     final protected function hasSubModel($model)
252 252
     {
253 253
         if (array_key_exists($model, $this->validSubModels)) {
254
-            return (bool)is_file($this->validSubModels[ $model ]);
254
+            return (bool)is_file($this->validSubModels[$model]);
255 255
         }
256 256
 
257 257
         return false;
Please login to merge, or discard this patch.
src/Http/View.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         );
75 75
 
76 76
         if ($this->config->offsetExists('extensions')) {
77
-            $this->setFileExtensions($this->config[ 'extensions' ]);
77
+            $this->setFileExtensions($this->config['extensions']);
78 78
         }
79 79
 
80 80
         $this->document = new Html\Document();
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function &__get($property)
92 92
     {
93
-        $get[ $property ] = false;
93
+        $get[$property] = false;
94 94
 
95 95
         if (property_exists($this, $property)) {
96 96
             return $this->{$property};
97 97
         }
98 98
 
99
-        return $get[ $property ];
99
+        return $get[$property];
100 100
     }
101 101
 
102 102
     public function parse($string, array $vars = [])
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
             $error = new ErrorException(
154 154
                 'E_VIEW_NOT_FOUND',
155 155
                 0,
156
-                @$backtrace[ 0 ][ 'file' ],
157
-                @$backtrace[ 0 ][ 'line' ],
156
+                @$backtrace[0]['file'],
157
+                @$backtrace[0]['line'],
158 158
                 [trim($filename)]
159 159
             );
160 160
 
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 
301 301
     public function render(array $options = [])
302 302
     {
303
-        if(profiler() !== false) {
303
+        if (profiler() !== false) {
304 304
             profiler()->watch('Starting View Rendering');
305 305
         }
306 306
         
@@ -405,9 +405,9 @@  discard block
 block discarded – undo
405 405
         if ($this->config->output['uglify'] === true) {
406 406
             $htmlOutput = preg_replace(
407 407
                 [
408
-                    '/\>[^\S ]+/s',     // strip whitespaces after tags, except space
409
-                    '/[^\S ]+\</s',     // strip whitespaces before tags, except space
410
-                    '/(\s)+/s',         // shorten multiple whitespace sequences
408
+                    '/\>[^\S ]+/s', // strip whitespaces after tags, except space
409
+                    '/[^\S ]+\</s', // strip whitespaces before tags, except space
410
+                    '/(\s)+/s', // shorten multiple whitespace sequences
411 411
                     '/<!--(.|\s)*?-->/', // Remove HTML comments
412 412
                     '/<!--(.*)-->/Uis',
413 413
                     "/[[:blank:]]+/",
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
             $htmlOutput = $beautifier->format($htmlOutput);
430 430
         }
431 431
 
432
-        if(profiler() !== false) {
432
+        if (profiler() !== false) {
433 433
             profiler()->watch('Ending View Rendering');
434 434
         }
435 435
 
Please login to merge, or discard this patch.
src/Http/Controller.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 {
25 25
     public function &__get($property)
26 26
     {
27
-        $get[ $property ] = false;
27
+        $get[$property] = false;
28 28
 
29 29
         // CodeIgniter property aliasing
30 30
         if ($property === 'load') {
@@ -32,15 +32,15 @@  discard block
 block discarded – undo
32 32
         }
33 33
 
34 34
         if (services()->has($property)) {
35
-            $get[ $property ] = services()->get($property);
35
+            $get[$property] = services()->get($property);
36 36
         } elseif (o2system()->__isset($property)) {
37
-            $get[ $property ] = o2system()->__get($property);
37
+            $get[$property] = o2system()->__get($property);
38 38
         } elseif ($property === 'model') {
39
-            $get[ $property ] = models('controller');
39
+            $get[$property] = models('controller');
40 40
         } elseif ($property === 'services' || $property === 'libraries') {
41
-            $get[ $property ] = services();
41
+            $get[$property] = services();
42 42
         }
43 43
 
44
-        return $get[ $property ];
44
+        return $get[$property];
45 45
     }
46 46
 }
47 47
\ No newline at end of file
Please login to merge, or discard this patch.
src/Http/Input.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     protected function filter($type, $offset = null, $filter = FILTER_DEFAULT)
35 35
     {
36 36
         if (services()->has('xssProtection')) {
37
-            if (!services()->get('xssProtection')->verify()) {
37
+            if ( ! services()->get('xssProtection')->verify()) {
38 38
                 $string = parent::filter($type, $offset, $filter);
39 39
 
40 40
                 if (is_string($string)) {
Please login to merge, or discard this patch.
src/Http/Middleware/Csrf.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     {
37 37
         if (services()->has('csrfProtection')) {
38 38
             if (hash_equals(input()->server('REQUEST_METHOD'), 'POST')) {
39
-                if (!services()->get('csrfProtection')->verify()) {
39
+                if ( ! services()->get('csrfProtection')->verify()) {
40 40
                     output()->sendError(403, [
41 41
                         'message' => language()->getLine('403_INVALID_CSRF')
42 42
                     ]);
Please login to merge, or discard this patch.
src/Http/Presenter/Page.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -33,12 +33,12 @@  discard block
 block discarded – undo
33 33
     {
34 34
         // Create Page breadcrumbs
35 35
         $breadcrumb = new Breadcrumb();
36
-        $breadcrumb->createList( new Link( language()->getLine( 'HOME' ), base_url() ) );
37
-        $this->store( 'breadcrumb', $breadcrumb );
36
+        $breadcrumb->createList(new Link(language()->getLine('HOME'), base_url()));
37
+        $this->store('breadcrumb', $breadcrumb);
38 38
 
39 39
         // Store Page Uri
40 40
         $uri = new Uri();
41
-        $this->store( 'uri', $uri );
41
+        $this->store('uri', $uri);
42 42
     }
43 43
 
44 44
     // ------------------------------------------------------------------------
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
      *
51 51
      * @return static
52 52
      */
53
-    public function setHeader( $header )
53
+    public function setHeader($header)
54 54
     {
55
-        $header = trim( $header );
56
-        $this->store( 'header', $header );
57
-        presenter()->meta->offsetSet( 'subtitle', $header );
58
-        presenter()->meta->title->append( $header );
55
+        $header = trim($header);
56
+        $this->store('header', $header);
57
+        presenter()->meta->offsetSet('subtitle', $header);
58
+        presenter()->meta->title->append($header);
59 59
 
60 60
         return $this;
61 61
     }
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
      *
70 70
      * @return static
71 71
      */
72
-    public function setSubHeader( $subHeader )
72
+    public function setSubHeader($subHeader)
73 73
     {
74
-        $this->store( 'subHeader', trim( $subHeader ) );
74
+        $this->store('subHeader', trim($subHeader));
75 75
 
76 76
         return $this;
77 77
     }
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
      *
86 86
      * @return static
87 87
      */
88
-    public function setDescription( $description )
88
+    public function setDescription($description)
89 89
     {
90
-        $description = trim( $description );
91
-        $this->store( 'description', $description );
90
+        $description = trim($description);
91
+        $this->store('description', $description);
92 92
 
93 93
         return $this;
94 94
     }
Please login to merge, or discard this patch.