Completed
Pull Request — master (#268)
by
unknown
05:37
created
controllers/UserController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 use yii\web\BadRequestHttpException;
15 15
 use yii\web\Controller;
16 16
 use yii\filters\VerbFilter;
17
-use yii\filters\AccessControl;
18 17
 use yii\web\NotFoundHttpException;
19 18
 use yii\base\UserException;
20 19
 use yii\mail\BaseMailer;
Please login to merge, or discard this patch.
models/searchs/Menu.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace mdm\admin\models\searchs;
4 4
 
5
-use Yii;
6 5
 use yii\base\Model;
7 6
 use yii\data\ActiveDataProvider;
8 7
 use mdm\admin\models\Menu as MenuModel;
Please login to merge, or discard this 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.
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.
models/form/ResetPassword.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace mdm\admin\models\searchs;
4 4
 
5
-use Yii;
6 5
 use yii\base\Model;
7 6
 use yii\data\ActiveDataProvider;
8 7
 use mdm\admin\models\Menu as MenuModel;
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.