Passed
Push — master ( 30acc8...22d469 )
by Toir
46s queued 21s
created
components/Helper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -233,7 +233,7 @@
 block discarded – undo
233 233
             }
234 234
             return implode(' ', $result);
235 235
         }
236
-        return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function ($matches) use ($user) {
236
+        return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function($matches) use ($user) {
237 237
             return static::checkRoute($matches[1], [], $user) ? "{{$matches[1]}}" : '';
238 238
         }, $buttons);
239 239
     }
Please login to merge, or discard this patch.
components/AccessControl.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -100,15 +100,15 @@
 block discarded – undo
100 100
         }
101 101
 
102 102
         $user = $this->getUser();
103
-        if($user->getIsGuest())
103
+        if ($user->getIsGuest())
104 104
         {
105 105
             $loginUrl = null;
106
-            if(is_array($user->loginUrl) && isset($user->loginUrl[0])){
106
+            if (is_array($user->loginUrl) && isset($user->loginUrl[0])) {
107 107
                 $loginUrl = $user->loginUrl[0];
108
-                }else if(is_string($user->loginUrl)){
108
+                } else if (is_string($user->loginUrl)) {
109 109
                     $loginUrl = $user->loginUrl;
110 110
                 }
111
-                if(!is_null($loginUrl) && trim($loginUrl,'/') === $uniqueId)
111
+                if (!is_null($loginUrl) && trim($loginUrl, '/') === $uniqueId)
112 112
                 {
113 113
                     return false;
114 114
                 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
             $loginUrl = null;
106 106
             if(is_array($user->loginUrl) && isset($user->loginUrl[0])){
107 107
                 $loginUrl = $user->loginUrl[0];
108
-                }else if(is_string($user->loginUrl)){
108
+                } else if(is_string($user->loginUrl)){
109 109
                     $loginUrl = $user->loginUrl;
110 110
                 }
111 111
                 if(!is_null($loginUrl) && trim($loginUrl,'/') === $uniqueId)
Please login to merge, or discard this patch.
BaseObject.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace toir427\admin;
4 4
 
5
-if(!class_exists('yii\base\BaseObject')){
5
+if (!class_exists('yii\base\BaseObject')) {
6 6
     class_alias('yii\base\Object', 'yii\base\BaseObject');
7 7
 }
8 8
 
Please login to merge, or discard this patch.
models/searchs/User.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     public function rules()
23 23
     {
24 24
         return [
25
-            [['id', 'status',], 'integer'],
25
+            [['id', 'status', ], 'integer'],
26 26
             [['username', 'email'], 'safe'],
27 27
         ];
28 28
     }
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function search($params)
38 38
     {
39 39
         /* @var $query \yii\db\ActiveQuery */
40
-        $class = Yii::$app->getUser()->identityClass ? : 'toir427\admin\models\User';
40
+        $class = Yii::$app->getUser()->identityClass ?: 'toir427\admin\models\User';
41 41
         $query = $class::find();
42 42
 
43 43
         $dataProvider = new ActiveDataProvider([
Please login to merge, or discard this patch.
models/searchs/Menu.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
     {
46 46
         $query = MenuModel::find()
47 47
             ->from(MenuModel::tableName() . ' t')
48
-            ->joinWith(['menuParent' => function ($q) {
48
+            ->joinWith(['menuParent' => function($q) {
49 49
             $q->from(MenuModel::tableName() . ' parent');
50 50
         }]);
51 51
 
Please login to merge, or discard this patch.
models/AuthItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         return [
62 62
             [['ruleName'], 'checkRule'],
63 63
             [['name', 'type'], 'required'],
64
-            [['name'], 'checkUnique', 'when' => function () {
64
+            [['name'], 'checkUnique', 'when' => function() {
65 65
                 return $this->isNewRecord || ($this->_item->name != $this->name);
66 66
             }],
67 67
             [['type'], 'integer'],
Please login to merge, or discard this patch.
models/form/Signup.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function rules()
24 24
     {
25
-        $class = Yii::$app->getUser()->identityClass ? : 'toir427\admin\models\User';
25
+        $class = Yii::$app->getUser()->identityClass ?: 'toir427\admin\models\User';
26 26
         return [
27 27
             ['username', 'filter', 'filter' => 'trim'],
28 28
             ['username', 'required'],
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function signup()
51 51
     {
52 52
         if ($this->validate()) {
53
-            $class = Yii::$app->getUser()->identityClass ? : 'toir427\admin\models\User';
53
+            $class = Yii::$app->getUser()->identityClass ?: 'toir427\admin\models\User';
54 54
             $user = new $class();
55 55
             $user->username = $this->username;
56 56
             $user->email = $this->email;
Please login to merge, or discard this patch.
models/form/Login.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
     public function getUser()
72 72
     {
73 73
         if ($this->_user === false) {
74
-            $class = Yii::$app->getUser()->identityClass ? : 'toir427\admin\models\User';
74
+            $class = Yii::$app->getUser()->identityClass ?: 'toir427\admin\models\User';
75 75
             $this->_user = $class::findByUsername($this->username);
76 76
         }
77 77
 
Please login to merge, or discard this patch.
models/form/PasswordResetRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      */
19 19
     public function rules()
20 20
     {
21
-        $class = Yii::$app->getUser()->identityClass ? : 'toir427\admin\models\User';
21
+        $class = Yii::$app->getUser()->identityClass ?: 'toir427\admin\models\User';
22 22
         return [
23 23
             ['email', 'filter', 'filter' => 'trim'],
24 24
             ['email', 'required'],
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public function sendEmail()
40 40
     {
41 41
         /* @var $user User */
42
-        $class = Yii::$app->getUser()->identityClass ? : 'toir427\admin\models\User';
42
+        $class = Yii::$app->getUser()->identityClass ?: 'toir427\admin\models\User';
43 43
         $user = $class::findOne([
44 44
             'status' => UserStatus::ACTIVE,
45 45
             'email' => $this->email,
Please login to merge, or discard this patch.