@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | foreach ($items as $name) { |
46 | 46 | try { |
47 | 47 | $item = $manager->getRole($name); |
48 | - $item = $item ? : $manager->getPermission($name); |
|
48 | + $item = $item ?: $manager->getPermission($name); |
|
49 | 49 | $manager->assign($item, $this->id); |
50 | 50 | $success++; |
51 | 51 | } catch (\Exception $exc) { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | foreach ($items as $name) { |
69 | 69 | try { |
70 | 70 | $item = $manager->getRole($name); |
71 | - $item = $item ? : $manager->getPermission($name); |
|
71 | + $item = $item ?: $manager->getPermission($name); |
|
72 | 72 | $manager->revoke($item, $this->id); |
73 | 73 | $success++; |
74 | 74 | } catch (\Exception $exc) { |
@@ -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 | /** |
42 | 42 | * Search BizRule |
43 | 43 | * @param array $params |
44 | - * @return \yii\data\ActiveDataProvider|\yii\data\ArrayDataProvider |
|
44 | + * @return ArrayDataProvider |
|
45 | 45 | */ |
46 | 46 | public function search($params) |
47 | 47 | { |
@@ -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 | } |