@@ -38,7 +38,7 @@ |
||
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 |
@@ -2,7 +2,6 @@ |
||
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; |
@@ -41,7 +41,7 @@ |
||
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 | ?> |
@@ -4,7 +4,7 @@ |
||
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 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | /** |
38 | 38 | * Lists all Menu models. |
39 | - * @return mixed |
|
39 | + * @return string |
|
40 | 40 | */ |
41 | 41 | public function actionIndex() |
42 | 42 | { |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | /** |
53 | 53 | * Displays a single Menu model. |
54 | 54 | * @param integer $id |
55 | - * @return mixed |
|
55 | + * @return string |
|
56 | 56 | */ |
57 | 57 | public function actionView($id) |
58 | 58 | { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * Deletes an existing Menu model. |
107 | 107 | * If deletion is successful, the browser will be redirected to the 'index' page. |
108 | 108 | * @param integer $id |
109 | - * @return mixed |
|
109 | + * @return \yii\web\Response |
|
110 | 110 | */ |
111 | 111 | public function actionDelete($id) |
112 | 112 | { |
@@ -149,7 +149,7 @@ discard block |
||
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 |
||
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 | /** |
@@ -111,7 +111,7 @@ |
||
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 | { |
@@ -49,9 +49,9 @@ |
||
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 | } |
@@ -117,7 +117,7 @@ discard block |
||
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 |
||
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 | /** |
@@ -120,7 +120,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |