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.
Completed
Push — master ( e56ca6...0ebcf3 )
by Vadim
02:36
created
ActiveRecord.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
         // If table not have fields, then behavior not use
63 63
         $behaviors = [];
64 64
         //Check timestamp
65
-        if ($this->hasAttribute($this->createdAtAttribute) && $this->hasAttribute($this->updatedAtAttribute))
66
-            $behaviors['timestamp'] = [
65
+        if ($this->hasAttribute($this->createdAtAttribute) && $this->hasAttribute($this->updatedAtAttribute)) {
66
+                    $behaviors['timestamp'] = [
67 67
                 'class' => TimestampBehavior::className(),
68 68
                 'attributes' => [
69 69
                     ActiveRecord::EVENT_BEFORE_INSERT => [$this->createdAtAttribute, $this->updatedAtAttribute],
@@ -71,14 +71,16 @@  discard block
 block discarded – undo
71 71
                 ],
72 72
 
73 73
             ];
74
+        }
74 75
 
75 76
         //Check blameable
76
-        if ($this->hasAttribute($this->createdByAttribute) && $this->hasAttribute($this->updatedByAttribute))
77
-            $behaviors['blameable'] = [
77
+        if ($this->hasAttribute($this->createdByAttribute) && $this->hasAttribute($this->updatedByAttribute)) {
78
+                    $behaviors['blameable'] = [
78 79
                 'class' => UserDataBehavior::className(),
79 80
                 'createdByAttribute' => $this->createdByAttribute,
80 81
                 'updatedByAttribute' => $this->updatedByAttribute,
81 82
             ];
83
+        }
82 84
 
83 85
         //Check trash
84 86
         if ($this->hasAttribute($this->removedAttribute)) {
@@ -94,9 +96,10 @@  discard block
 block discarded – undo
94 96
     public function beforeSave($insert)
95 97
     {
96 98
         if ($insert) {
97
-            if ($this->hasAttribute($this->lockedAttribute))
98
-                if (empty($this->{$this->lockedAttribute}) || is_null($this->{$this->lockedAttribute}))
99
+            if ($this->hasAttribute($this->lockedAttribute)) {
100
+                            if (empty($this->{$this->lockedAttribute}) || is_null($this->{$this->lockedAttribute}))
99 101
                     $this->{$this->lockedAttribute} = self::STATUS_UNLOCK;
102
+            }
100 103
         }
101 104
 
102 105
         return parent::beforeSave($insert);
@@ -120,8 +123,9 @@  discard block
 block discarded – undo
120 123
     public function duplicate(){
121 124
         $this->isNewRecord=true;
122 125
 
123
-        foreach($this->primaryKey() as $key)
124
-            $this->$key = null;
126
+        foreach($this->primaryKey() as $key) {
127
+                    $this->$key = null;
128
+        }
125 129
 
126 130
         if($this->save()){
127 131
             return $this;
Please login to merge, or discard this patch.