Completed
Pull Request — master (#268)
by
unknown
05:37
created
mail/passwordResetToken-text.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 /* @var $this yii\web\View */
5 5
 /* @var $user mdm\admin\models\User */
6 6
 
7
-$resetLink = Url::to(['user/reset-password','token'=>$user->password_reset_token], true);
7
+$resetLink = Url::to(['user/reset-password', 'token'=>$user->password_reset_token], true);
8 8
 ?>
9 9
 Hello <?= $user->username ?>,
10 10
 
Please login to merge, or discard this patch.
models/Assignment.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         foreach ($items as $name) {
46 46
             try {
47 47
                 $item = $manager->getRole($name);
48
-                $item = $item ? : $manager->getPermission($name);
48
+                $item = $item ?: $manager->getPermission($name);
49 49
                 $manager->assign($item, $this->id);
50 50
                 $success++;
51 51
             } catch (\Exception $exc) {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         foreach ($items as $name) {
69 69
             try {
70 70
                 $item = $manager->getRole($name);
71
-                $item = $item ? : $manager->getPermission($name);
71
+                $item = $item ?: $manager->getPermission($name);
72 72
                 $manager->revoke($item, $this->id);
73 73
                 $success++;
74 74
             } catch (\Exception $exc) {
Please login to merge, or discard this patch.
controllers/AssignmentController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         parent::init();
33 33
         if ($this->userClassName === null) {
34 34
             $this->userClassName = Yii::$app->getUser()->identityClass;
35
-            $this->userClassName = $this->userClassName ? : 'mdm\admin\models\User';
35
+            $this->userClassName = $this->userClassName ?: 'mdm\admin\models\User';
36 36
         }
37 37
     }
38 38
 
Please login to merge, or discard this patch.
controllers/RuleController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
             return $this->redirect(['view', 'id' => $model->name]);
76 76
         } else {
77
-            return $this->render('create', ['model' => $model,]);
77
+            return $this->render('create', ['model' => $model, ]);
78 78
         }
79 79
     }
80 80
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             return $this->redirect(['view', 'id' => $model->name]);
94 94
         }
95 95
 
96
-        return $this->render('update', ['model' => $model,]);
96
+        return $this->render('update', ['model' => $model, ]);
97 97
     }
98 98
 
99 99
     /**
Please login to merge, or discard this patch.
views/rule/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
                 'attribute' => 'description',
42 42
                 'label' => Yii::t('rbac-admin', 'Description'),
43 43
             ],
44
-            ['class' => 'yii\grid\ActionColumn',],
44
+            ['class' => 'yii\grid\ActionColumn', ],
45 45
         ],
46 46
     ])
47 47
     ?>
Please login to merge, or discard this patch.
mail/passwordResetToken-html.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 /* @var $this yii\web\View */
5 5
 /* @var $user mdm\admin\models\User */
6 6
 
7
-$resetLink = Url::to(['user/reset-password','token'=>$user->password_reset_token], true);
7
+$resetLink = Url::to(['user/reset-password', 'token'=>$user->password_reset_token], true);
8 8
 ?>
9 9
 Hello <?= $user->username ?>,
10 10
 
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
@@ -49,9 +49,9 @@
 block discarded – undo
49 49
 
50 50
             if ($user->save()) {
51 51
                 return Yii::$app->mailer->compose(['html' => 'passwordResetToken-html', 'text' => 'passwordResetToken-text'], ['user' => $user])
52
-                    ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name . ' robot'])
52
+                    ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name.' robot'])
53 53
                     ->setTo($this->email)
54
-                    ->setSubject('Password reset for ' . Yii::$app->name)
54
+                    ->setSubject('Password reset for '.Yii::$app->name)
55 55
                     ->send();
56 56
             }
57 57
         }
Please login to merge, or discard this patch.
models/User.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         }
118 118
         $expire = Yii::$app->params['user.passwordResetTokenExpire'];
119 119
         $parts = explode('_', $token);
120
-        $timestamp = (int) end($parts);
120
+        $timestamp = (int)end($parts);
121 121
         return $timestamp + $expire >= time();
122 122
     }
123 123
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
      */
180 180
     public function generatePasswordResetToken()
181 181
     {
182
-        $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();
182
+        $this->password_reset_token = Yii::$app->security->generateRandomString().'_'.time();
183 183
     }
184 184
 
185 185
     /**
Please login to merge, or discard this patch.
models/searchs/Menu.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@
 block discarded – undo
44 44
     public function search($params)
45 45
     {
46 46
         $query = MenuModel::find()
47
-            ->from(MenuModel::tableName() . ' t')
48
-            ->joinWith(['menuParent' => function ($q) {
49
-            $q->from(MenuModel::tableName() . ' parent');
47
+            ->from(MenuModel::tableName().' t')
48
+            ->joinWith(['menuParent' => function($q) {
49
+            $q->from(MenuModel::tableName().' parent');
50 50
         }]);
51 51
 
52 52
         $dataProvider = new ActiveDataProvider([
Please login to merge, or discard this patch.