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 ( fd1b58...602110 )
by Steeven
03:43
created
src/Models/Sql/Traits/ModifierTrait.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
             }
46 46
 
47 47
             if (method_exists($this, 'getRecordOrdering')) {
48
-                if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) {
49
-                    $sets[ 'record_ordering' ] = $this->getRecordOrdering();
48
+                if ($this->recordOrdering === true && empty($sets['record_ordering'])) {
49
+                    $sets['record_ordering'] = $this->getRecordOrdering();
50 50
                 }
51 51
             }
52 52
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                 if ($files = input()->files()) {
62 62
                     // Uploaded Image Process
63 63
                     if (isset($this->uploadedImageKey)) {
64
-                        if (isset($files[ $this->uploadedImageKey ])) {
64
+                        if (isset($files[$this->uploadedImageKey])) {
65 65
                             $upload->process($this->uploadedImageKey);
66 66
 
67 67
                             if ($upload->getErrors()) {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
                         }
81 81
                     } elseif (count($this->uploadedImageKeys)) {
82 82
                         foreach ($this->uploadedImageKeys as $uploadedImageKey) {
83
-                            if (isset($files[ $uploadedImageKey ])) {
83
+                            if (isset($files[$uploadedImageKey])) {
84 84
                                 $upload->process($uploadedImageKey);
85 85
 
86 86
                                 if ($upload->getErrors()) {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
                     // Uploaded File Process
104 104
                     if (isset($this->uploadedFileFilepath)) {
105
-                        if (isset($files[ $this->uploadedFileKey ])) {
105
+                        if (isset($files[$this->uploadedFileKey])) {
106 106
                             $upload->process($this->uploadedFileKey);
107 107
 
108 108
                             if ($upload->getErrors()) {
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                         }
122 122
                     } elseif (count($this->uploadedFileKeys)) {
123 123
                         foreach ($this->uploadedFileKeys as $uploadedFileKey) {
124
-                            if (isset($files[ $uploadedFileKey ])) {
124
+                            if (isset($files[$uploadedFileKey])) {
125 125
                                 $upload->process($uploadedFileKey);
126 126
 
127 127
                                 if ($upload->getErrors()) {
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
 
155 155
                 $label = false;
156 156
                 foreach (['name', 'label', 'title', 'code'] as $labelField) {
157
-                    if (isset($sets[ $labelField ])) {
158
-                        session()->setFlash('success', language('SUCCESS_INSERT_WITH_LABEL', $sets[ $labelField ]));
157
+                    if (isset($sets[$labelField])) {
158
+                        session()->setFlash('success', language('SUCCESS_INSERT_WITH_LABEL', $sets[$labelField]));
159 159
                         $label = true;
160 160
                         break;
161 161
                     }
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
 
172 172
         $label = false;
173 173
         foreach (['name', 'label', 'title', 'code'] as $labelField) {
174
-            if (isset($sets[ $labelField ])) {
175
-                session()->setFlash('danger', language('FAILED_INSERT_WITH_LABEL', $sets[ $labelField ]));
174
+            if (isset($sets[$labelField])) {
175
+                session()->setFlash('danger', language('FAILED_INSERT_WITH_LABEL', $sets[$labelField]));
176 176
                 $label = true;
177 177
                 break;
178 178
             }
@@ -205,8 +205,8 @@  discard block
 block discarded – undo
205 205
             $primaryKey = isset($this->primaryKey) ? $this->primaryKey : 'id';
206 206
 
207 207
             if (empty($conditions)) {
208
-                if (isset($sets[ $primaryKey ])) {
209
-                    $conditions = [$primaryKey => $sets[ $primaryKey ]];
208
+                if (isset($sets[$primaryKey])) {
209
+                    $conditions = [$primaryKey => $sets[$primaryKey]];
210 210
                 } else {
211 211
                     $conditions = $sets;
212 212
                 }
@@ -240,8 +240,8 @@  discard block
 block discarded – undo
240 240
             if (method_exists($this, 'insertRecordSets')) {
241 241
                 foreach ($sets as $set) {
242 242
                     $this->insertRecordSets($set);
243
-                    if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) {
244
-                        $set[ 'record_ordering' ] = $this->getRecordOrdering();
243
+                    if ($this->recordOrdering === true && empty($sets['record_ordering'])) {
244
+                        $set['record_ordering'] = $this->getRecordOrdering();
245 245
                     }
246 246
                 }
247 247
             }
@@ -313,8 +313,8 @@  discard block
 block discarded – undo
313 313
             $primaryKey = isset($this->primaryKey) ? $this->primaryKey : 'id';
314 314
 
315 315
             if (empty($conditions)) {
316
-                if (isset($sets[ $primaryKey ])) {
317
-                    $conditions = [$primaryKey => $sets[ $primaryKey ]];
316
+                if (isset($sets[$primaryKey])) {
317
+                    $conditions = [$primaryKey => $sets[$primaryKey]];
318 318
                 }
319 319
             }
320 320
 
@@ -327,8 +327,8 @@  discard block
 block discarded – undo
327 327
             }
328 328
 
329 329
             if (method_exists($this, 'getRecordOrdering')) {
330
-                if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) {
331
-                    $sets[ 'record_ordering' ] = $this->getRecordOrdering();
330
+                if ($this->recordOrdering === true && empty($sets['record_ordering'])) {
331
+                    $sets['record_ordering'] = $this->getRecordOrdering();
332 332
                 }
333 333
             }
334 334
 
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
                     if ($files = input()->files()) {
345 345
                         // Uploaded Image Process
346 346
                         if (isset($this->uploadedImageKey)) {
347
-                            if (isset($files[ $this->uploadedImageKey ])) {
347
+                            if (isset($files[$this->uploadedImageKey])) {
348 348
                                 $upload->process($this->uploadedImageKey);
349 349
 
350 350
                                 if ($upload->getErrors()) {
@@ -359,8 +359,8 @@  discard block
 block discarded – undo
359 359
                                     }
360 360
 
361 361
                                     return false;
362
-                                } elseif ($row->offsetGet($this->uploadedImageKey) !== $upload->getUploadedFiles()->first()[ 'name' ]) {
363
-                                    $sets[ $this->uploadedImageKey ] = $upload->getUploadedFiles()->first()[ 'name' ];
362
+                                } elseif ($row->offsetGet($this->uploadedImageKey) !== $upload->getUploadedFiles()->first()['name']) {
363
+                                    $sets[$this->uploadedImageKey] = $upload->getUploadedFiles()->first()['name'];
364 364
 
365 365
                                     if (is_file($filePath = $this->uploadedImageFilePath . $row->offsetGet($this->uploadedImageKey))) {
366 366
                                         unlink($filePath);
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
                             }
370 370
                         } elseif (count($this->uploadedImageKeys)) {
371 371
                             foreach ($this->uploadedImageKeys as $uploadedImageKey) {
372
-                                if (isset($files[ $uploadedImageKey ])) {
372
+                                if (isset($files[$uploadedImageKey])) {
373 373
                                     $upload->process($uploadedImageKey);
374 374
 
375 375
                                     if ($upload->getErrors()) {
@@ -384,8 +384,8 @@  discard block
 block discarded – undo
384 384
                                         }
385 385
 
386 386
                                         return false;
387
-                                    } elseif ($row->offsetGet($uploadedImageKey) !== $upload->getUploadedFiles()->first()[ 'name' ]) {
388
-                                        $sets[ $uploadedImageKey ] = $upload->getUploadedFiles()->first()[ 'name' ];
387
+                                    } elseif ($row->offsetGet($uploadedImageKey) !== $upload->getUploadedFiles()->first()['name']) {
388
+                                        $sets[$uploadedImageKey] = $upload->getUploadedFiles()->first()['name'];
389 389
 
390 390
                                         if (is_file($filePath = $this->uploadedImageFilePath . $row->offsetGet($uploadedImageKey))) {
391 391
                                             unlink($filePath);
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 
398 398
                         // Uploaded File Process
399 399
                         if (isset($this->uploadedFileFilepath)) {
400
-                            if (isset($files[ $this->uploadedFileKey ])) {
400
+                            if (isset($files[$this->uploadedFileKey])) {
401 401
                                 $upload->process($this->uploadedFileKey);
402 402
 
403 403
                                 if ($upload->getErrors()) {
@@ -412,8 +412,8 @@  discard block
 block discarded – undo
412 412
                                     }
413 413
 
414 414
                                     return false;
415
-                                } elseif ($row->offsetGet($this->uploadedFileKey) !== $upload->getUploadedFiles()->first()[ 'name' ]) {
416
-                                    $sets[ $this->uploadedFileKey ] = $upload->getUploadedFiles()->first()[ 'name' ];
415
+                                } elseif ($row->offsetGet($this->uploadedFileKey) !== $upload->getUploadedFiles()->first()['name']) {
416
+                                    $sets[$this->uploadedFileKey] = $upload->getUploadedFiles()->first()['name'];
417 417
 
418 418
                                     if (is_file($filePath = $this->uploadedFileFilepath . $row->offsetGet($this->uploadedFileKey))) {
419 419
                                         unlink($filePath);
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
                             }
423 423
                         } elseif (count($this->uploadedFileKeys)) {
424 424
                             foreach ($this->uploadedFileKeys as $uploadedFileKey) {
425
-                                if (isset($files[ $uploadedFileKey ])) {
425
+                                if (isset($files[$uploadedFileKey])) {
426 426
                                     $upload->process($uploadedFileKey);
427 427
 
428 428
                                     if ($upload->getErrors()) {
@@ -437,8 +437,8 @@  discard block
 block discarded – undo
437 437
                                         }
438 438
 
439 439
                                         return false;
440
-                                    } elseif ($row->offsetGet($uploadedFileKey) !== $upload->getUploadedFiles()->first()[ 'name' ]) {
441
-                                        $sets[ $uploadedFileKey ] = $upload->getUploadedFiles()->first()[ 'name' ];
440
+                                    } elseif ($row->offsetGet($uploadedFileKey) !== $upload->getUploadedFiles()->first()['name']) {
441
+                                        $sets[$uploadedFileKey] = $upload->getUploadedFiles()->first()['name'];
442 442
 
443 443
                                         if (is_file($filePath = $this->uploadedFileFilepath . $row->offsetGet($uploadedFileKey))) {
444 444
                                             unlink($filePath);
@@ -458,8 +458,8 @@  discard block
 block discarded – undo
458 458
 
459 459
                     $label = false;
460 460
                     foreach (['name', 'label', 'title', 'code'] as $labelField) {
461
-                        if (isset($sets[ $labelField ])) {
462
-                            session()->setFlash('success', language('SUCCESS_UPDATE_WITH_LABEL', $sets[ $labelField ]));
461
+                        if (isset($sets[$labelField])) {
462
+                            session()->setFlash('success', language('SUCCESS_UPDATE_WITH_LABEL', $sets[$labelField]));
463 463
                             $label = true;
464 464
                             break;
465 465
                         }
@@ -476,8 +476,8 @@  discard block
 block discarded – undo
476 476
 
477 477
         $label = false;
478 478
         foreach (['name', 'label', 'title', 'code'] as $labelField) {
479
-            if (isset($sets[ $labelField ])) {
480
-                session()->setFlash('danger', language('FAILED_UPDATE_WITH_LABEL', $sets[ $labelField ]));
479
+            if (isset($sets[$labelField])) {
480
+                session()->setFlash('danger', language('FAILED_UPDATE_WITH_LABEL', $sets[$labelField]));
481 481
                 $label = true;
482 482
                 break;
483 483
             }
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 
525 525
         if (method_exists($this, 'updateRecordSets')) {
526 526
             foreach ($sets as $key => $set) {
527
-                $this->updateRecordSets($sets[ $key ]);
527
+                $this->updateRecordSets($sets[$key]);
528 528
             }
529 529
         }
530 530
 
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
      */
741 741
     private function updateRecordStatus($id, $recordStatus, $method)
742 742
     {
743
-        $sets[ 'record_status' ] = $recordStatus;
743
+        $sets['record_status'] = $recordStatus;
744 744
         $primaryKey = isset($this->primaryKey) ? $this->primaryKey : 'id';
745 745
 
746 746
         if (method_exists($this, 'updateRecordSets')) {
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
     private function updateRecordStatusMany(array $ids, $recordStatus, $method)
781 781
     {
782 782
         if (count($ids)) {
783
-            $sets[ 'record_status' ] = $recordStatus;
783
+            $sets['record_status'] = $recordStatus;
784 784
             $primaryKey = isset($this->primaryKey) ? $this->primaryKey : 'id';
785 785
 
786 786
             $this->qb->whereIn($primaryKey, $ids);
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
     private function updateRecordStatusBy($recordStatus, $method, array $conditions)
826 826
     {
827 827
         if (count($conditions)) {
828
-            $sets[ 'record_status' ] = $recordStatus;
828
+            $sets['record_status'] = $recordStatus;
829 829
 
830 830
             if (method_exists($this, 'updateRecordSets')) {
831 831
                 $this->updateRecordSets($sets);
@@ -867,7 +867,7 @@  discard block
 block discarded – undo
867 867
     private function updateRecordStatusManyBy($recordStatus, $method, array $conditions)
868 868
     {
869 869
         if (count($conditions)) {
870
-            $sets[ 'record_status' ] = $recordStatus;
870
+            $sets['record_status'] = $recordStatus;
871 871
 
872 872
             if (method_exists($this, 'updateRecordSets')) {
873 873
                 $this->updateRecordSets($sets);
Please login to merge, or discard this patch.
src/Models/Sql/DataObjects/Result.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@
 block discarded – undo
48 48
             $ormResult = new \SplFixedArray($result->count());
49 49
 
50 50
             foreach ($result as $key => $row) {
51
-                if(method_exists($model, 'rebuildRow')) {
51
+                if (method_exists($model, 'rebuildRow')) {
52 52
                     $row = $model->rebuildRow($row);
53 53
                 }
54 54
 
55
-                $ormResult[ $key ] = new Result\Row($row, $model);
55
+                $ormResult[$key] = new Result\Row($row, $model);
56 56
             }
57 57
 
58 58
             parent::__construct($ormResult->toArray());
Please login to merge, or discard this patch.