Completed
Push — master ( 13de46...ceb93d )
by Misbahul D
04:09
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.
views/rule/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
                 'attribute' => 'name',
31 31
                 'label' => Yii::t('rbac-admin', 'Name'),
32 32
             ],
33
-            ['class' => 'yii\grid\ActionColumn',],
33
+            ['class' => 'yii\grid\ActionColumn', ],
34 34
         ],
35 35
     ]);
36 36
     ?>
Please login to merge, or discard this patch.
views/layouts/main.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         echo Nav::widget([
39 39
             'options' => ['class' => 'nav navbar-nav navbar-right'],
40 40
             'items' => $this->context->module->navbar,
41
-         ]);
41
+            ]);
42 42
         NavBar::end();
43 43
         ?>
44 44
 
Please login to merge, or discard this patch.
models/AuthItem.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
     /**
112 112
      * Find role
113 113
      * @param string $id
114
-     * @return null|\self
114
+     * @return AuthItem|null
115 115
      */
116 116
     public static function find($id)
117 117
     {
Please login to merge, or discard this 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'], 'unique', 'when' => function () {
64
+            [['name'], 'unique', '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/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.
components/ItemController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      */
150 150
     public function getViewPath()
151 151
     {
152
-        return $this->module->getViewPath() . DIRECTORY_SEPARATOR . 'item';
152
+        return $this->module->getViewPath().DIRECTORY_SEPARATOR.'item';
153 153
     }
154 154
 
155 155
     /**
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function labels()
160 160
     {
161
-        throw new NotSupportedException(get_class($this) . ' does not support labels().');
161
+        throw new NotSupportedException(get_class($this).' does not support labels().');
162 162
     }
163 163
 
164 164
     /**
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
     /**
44 44
      * Lists all AuthItem models.
45
-     * @return mixed
45
+     * @return string
46 46
      */
47 47
     public function actionIndex()
48 48
     {
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     /**
59 59
      * Displays a single AuthItem model.
60 60
      * @param  string $id
61
-     * @return mixed
61
+     * @return string
62 62
      */
63 63
     public function actionView($id)
64 64
     {
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      * Deletes an existing AuthItem model.
104 104
      * If deletion is successful, the browser will be redirected to the 'index' page.
105 105
      * @param  string $id
106
-     * @return mixed
106
+     * @return \yii\web\Response
107 107
      */
108 108
     public function actionDelete($id)
109 109
     {
Please login to merge, or discard this patch.
components/Helper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             }
121 121
             while (($pos = strrpos($r, '/')) > 0) {
122 122
                 $r = substr($r, 0, $pos);
123
-                if ($user->can($r . '/*', $params)) {
123
+                if ($user->can($r.'/*', $params)) {
124 124
                     return true;
125 125
                 }
126 126
             }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             }
133 133
             while (($pos = strrpos($r, '/')) > 0) {
134 134
                 $r = substr($r, 0, $pos);
135
-                if (isset($routes[$r . '/*'])) {
135
+                if (isset($routes[$r.'/*'])) {
136 136
                     return true;
137 137
                 }
138 138
             }
@@ -143,15 +143,15 @@  discard block
 block discarded – undo
143 143
     protected static function normalizeRoute($route)
144 144
     {
145 145
         if ($route === '') {
146
-            return '/' . Yii::$app->controller->getRoute();
146
+            return '/'.Yii::$app->controller->getRoute();
147 147
         } elseif (strncmp($route, '/', 1) === 0) {
148 148
             return $route;
149 149
         } elseif (strpos($route, '/') === false) {
150
-            return '/' . Yii::$app->controller->getUniqueId() . '/' . $route;
150
+            return '/'.Yii::$app->controller->getUniqueId().'/'.$route;
151 151
         } elseif (($mid = Yii::$app->controller->module->getUniqueId()) !== '') {
152
-            return '/' . $mid . '/' . $route;
152
+            return '/'.$mid.'/'.$route;
153 153
         }
154
-        return '/' . $route;
154
+        return '/'.$route;
155 155
     }
156 156
 
157 157
     /**
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
             }
221 221
             return implode(' ', $result);
222 222
         }
223
-        return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function ($matches) use ($user) {
223
+        return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function($matches) use ($user) {
224 224
             return static::checkRoute($matches[1], [], $user) ? "{{$matches[1]}}" : '';
225 225
         }, $buttons);
226 226
     }
Please login to merge, or discard this patch.
views/user/view.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 $this->params['breadcrumbs'][] = ['label' => Yii::t('rbac-admin', 'Users'), 'url' => ['index']];
12 12
 $this->params['breadcrumbs'][] = $this->title;
13 13
 
14
-$controllerId = $this->context->uniqueId . '/';
14
+$controllerId = $this->context->uniqueId.'/';
15 15
 ?>
16 16
 <div class="user-view">
17 17
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     <p>
21 21
         <?php
22
-        if ($model->status == 0 && Helper::checkRoute($controllerId . 'activate')) {
22
+        if ($model->status == 0 && Helper::checkRoute($controllerId.'activate')) {
23 23
             echo Html::a(Yii::t('rbac-admin', 'Activate'), ['activate', 'id' => $model->id], [
24 24
                 'class' => 'btn btn-primary',
25 25
                 'data' => [
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         }
31 31
         ?>
32 32
         <?php
33
-        if (Helper::checkRoute($controllerId . 'delete')) {
33
+        if (Helper::checkRoute($controllerId.'delete')) {
34 34
             echo Html::a(Yii::t('rbac-admin', 'Delete'), ['delete', 'id' => $model->id], [
35 35
                 'class' => 'btn btn-danger',
36 36
                 'data' => [
Please login to merge, or discard this patch.