@@ -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 | { |
@@ -61,7 +61,7 @@ |
||
| 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'], |
@@ -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 | /** |
@@ -11,7 +11,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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' => [ |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | /* @var $this yii\web\View */ |
| 6 | 6 | /* @var $model mdm\admin\models\BizRule */ |
| 7 | 7 | |
| 8 | -$this->title = Yii::t('rbac-admin', 'Update Rule') . ': ' . $model->name; |
|
| 8 | +$this->title = Yii::t('rbac-admin', 'Update Rule').': '.$model->name; |
|
| 9 | 9 | $this->params['breadcrumbs'][] = ['label' => Yii::t('rbac-admin', 'Rules'), 'url' => ['index']]; |
| 10 | 10 | $this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->name]]; |
| 11 | 11 | $this->params['breadcrumbs'][] = Yii::t('rbac-admin', 'Update'); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | <div class="role-index"> |
| 22 | 22 | <h1><?= Html::encode($this->title) ?></h1> |
| 23 | 23 | <p> |
| 24 | - <?= Html::a(Yii::t('rbac-admin', 'Create ' . $labels['Item']), ['create'], ['class' => 'btn btn-success']) ?> |
|
| 24 | + <?= Html::a(Yii::t('rbac-admin', 'Create '.$labels['Item']), ['create'], ['class' => 'btn btn-success']) ?> |
|
| 25 | 25 | </p> |
| 26 | 26 | <?= |
| 27 | 27 | GridView::widget([ |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | 'attribute' => 'description', |
| 43 | 43 | 'label' => Yii::t('rbac-admin', 'Description'), |
| 44 | 44 | ], |
| 45 | - ['class' => 'yii\grid\ActionColumn',], |
|
| 45 | + ['class' => 'yii\grid\ActionColumn', ], |
|
| 46 | 46 | ], |
| 47 | 47 | ]) |
| 48 | 48 | ?> |