@@ -5,7 +5,7 @@ |
||
5 | 5 | /* @var $this yii\web\View */ |
6 | 6 | /* @var $user mdm\admin\models\User */ |
7 | 7 | |
8 | -$resetLink = Url::to(['user/reset-password','token'=>$user->password_reset_token], true); |
|
8 | +$resetLink = Url::to(['user/reset-password', 'token'=>$user->password_reset_token], true); |
|
9 | 9 | ?> |
10 | 10 | <div class="password-reset"> |
11 | 11 | <p>Hello <?= Html::encode($user->username) ?>,</p> |
@@ -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 |
@@ -32,7 +32,7 @@ |
||
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 |
@@ -74,7 +74,7 @@ discard block |
||
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 |
||
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 | /** |
@@ -30,7 +30,7 @@ |
||
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 | ?> |
@@ -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 | /** |
@@ -44,9 +44,9 @@ |
||
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([ |
@@ -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 | /** |