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 ( 173d59...ae9f57 )
by Steeven
02:22
created
src/Http/Controllers/Restful.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
      */
296 296
     public function index()
297 297
     {
298
-        if(empty($this->model)) {
298
+        if (empty($this->model)) {
299 299
             output()->sendError(204);
300 300
         } else {
301 301
             if ( ! $this->model instanceof Model) {
@@ -331,8 +331,8 @@  discard block
 block discarded – undo
331 331
                         $conditions = [];
332 332
 
333 333
                         foreach ($this->paramsWithRules as $param) {
334
-                            if ($get->offsetExists($param[ 'field' ])) {
335
-                                $conditions[ $param[ 'field' ] ] = $get->offsetGet($param[ 'field' ]);
334
+                            if ($get->offsetExists($param['field'])) {
335
+                                $conditions[$param['field']] = $get->offsetGet($param['field']);
336 336
                             }
337 337
                         }
338 338
 
@@ -381,9 +381,9 @@  discard block
 block discarded – undo
381 381
             if (is_numeric(key($code))) {
382 382
                 $message = reset($code);
383 383
                 $code = key($code);
384
-            } elseif (isset($code[ 'code' ])) {
385
-                $code = $code[ 'code' ];
386
-                $message = $code[ 'message' ];
384
+            } elseif (isset($code['code'])) {
385
+                $code = $code['code'];
386
+                $message = $code['message'];
387 387
             }
388 388
         }
389 389
 
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
                 $longPoolingCacheMetadata = $longPoolingCacheData->getMetadata();
452 452
 
453 453
                 // if no timestamp delivered via ajax or data.txt has been changed SINCE last ajax timestamp
454
-                if ($lastCallTimestamp == null || $longPoolingCacheMetadata[ 'ctime' ] > $lastCallTimestamp) {
454
+                if ($lastCallTimestamp == null || $longPoolingCacheMetadata['ctime'] > $lastCallTimestamp) {
455 455
                     output()->send([
456 456
                         'timestamp' => $longPoolingCacheMetadata,
457 457
                         'data'      => $data,
@@ -492,14 +492,14 @@  discard block
 block discarded – undo
492 492
 
493 493
             if (count($this->fillableColumnsWithRules)) {
494 494
                 foreach ($this->fillableColumnsWithRules as $column) {
495
-                    if ($post->offsetExists($column[ 'field' ])) {
496
-                        $data[ $column[ 'field' ] ] = $post->offsetGet($column[ 'field' ]);
495
+                    if ($post->offsetExists($column['field'])) {
496
+                        $data[$column['field']] = $post->offsetGet($column['field']);
497 497
                     }
498 498
                 }
499 499
             } elseif (count($this->fillableColumns)) {
500 500
                 foreach ($this->fillableColumns as $column) {
501
-                    if ($post->offsetExists($column[ 'field' ])) {
502
-                        $data[ $column[ 'field' ] ] = $post->offsetGet($column[ 'field' ]);
501
+                    if ($post->offsetExists($column['field'])) {
502
+                        $data[$column['field']] = $post->offsetGet($column['field']);
503 503
                     }
504 504
                 }
505 505
             } else {
@@ -507,11 +507,11 @@  discard block
 block discarded – undo
507 507
             }
508 508
 
509 509
             if (count($data)) {
510
-                $data[ 'record_create_timestamp' ] = $data[ 'record_update_timestamp' ] = timestamp();
511
-                $data[ 'record_create_user' ] = $data[ 'record_update_user' ] = globals()->account->id;
510
+                $data['record_create_timestamp'] = $data['record_update_timestamp'] = timestamp();
511
+                $data['record_create_user'] = $data['record_update_user'] = globals()->account->id;
512 512
 
513 513
                 if ($this->model->insert($data)) {
514
-                    $data[ 'id' ] = $this->model->db->getLastInsertId();
514
+                    $data['id'] = $this->model->db->getLastInsertId();
515 515
                     $this->sendPayload([
516 516
                         'code' => 201,
517 517
                         'Successful insert request',
@@ -545,8 +545,8 @@  discard block
 block discarded – undo
545 545
                 $rules = new Rules($post);
546 546
                 $rules->sets($this->fillableColumnsWithRules);
547 547
                 
548
-                if(count($this->model->primaryKeys)) {
549
-                    foreach($this->model->primaryKeys as $primaryKey) {
548
+                if (count($this->model->primaryKeys)) {
549
+                    foreach ($this->model->primaryKeys as $primaryKey) {
550 550
                         $rules->add($primaryKey, language('LABEL_' . strtoupper($primaryKey)), 'required', 'this field cannot be empty!');
551 551
                     }
552 552
                 } else {
@@ -568,14 +568,14 @@  discard block
 block discarded – undo
568 568
 
569 569
             if (count($this->fillableColumnsWithRules)) {
570 570
                 foreach ($this->fillableColumnsWithRules as $column) {
571
-                    if ($post->offsetExists($column[ 'field' ])) {
572
-                        $data[ $column[ 'field' ] ] = $post->offsetGet($column[ 'field' ]);
571
+                    if ($post->offsetExists($column['field'])) {
572
+                        $data[$column['field']] = $post->offsetGet($column['field']);
573 573
                     }
574 574
                 }
575 575
             } elseif (count($this->fillableColumns)) {
576 576
                 foreach ($this->fillableColumns as $column) {
577
-                    if ($post->offsetExists($column[ 'field' ])) {
578
-                        $data[ $column[ 'field' ] ] = $post->offsetGet($column[ 'field' ]);
577
+                    if ($post->offsetExists($column['field'])) {
578
+                        $data[$column['field']] = $post->offsetGet($column['field']);
579 579
                     }
580 580
                 }
581 581
             } else {
@@ -583,8 +583,8 @@  discard block
 block discarded – undo
583 583
             }
584 584
 
585 585
             if (count($data)) {
586
-                $data[ 'record_update_timestamp' ] = timestamp();
587
-                $data[ 'record_update_user' ] = globals()->account->id;
586
+                $data['record_update_timestamp'] = timestamp();
587
+                $data['record_update_user'] = globals()->account->id;
588 588
 
589 589
 
590 590
 
Please login to merge, or discard this patch.