@@ -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 | ?> |
@@ -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 |
@@ -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'], 'checkUnique', 'when' => function () { |
|
64 | + [['name'], 'checkUnique', '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 | /** |
@@ -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 | /** |
@@ -42,7 +42,7 @@ discard block |
||
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 |
||
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 |
||
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 | { |
@@ -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 | ?> |