| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 7 | public function rules() |
|
| 20 | { |
||
| 21 | return [ |
||
| 22 | 7 | ['email', 'filter', 'filter' => 'trim'], |
|
| 23 | ['email', 'required'], |
||
| 24 | ['email', 'email'], |
||
| 25 | 7 | ['email', 'exist', |
|
| 26 | 7 | 'targetClass' => '\app\models\User', |
|
| 27 | 7 | 'filter' => ['status' => User::STATUS_ACTIVE], |
|
| 28 | 7 | 'message' => Yii::t('app.validators', 'There is no user with such email') |
|
| 29 | ], |
||
| 30 | ]; |
||
| 31 | } |
||
| 32 | |||
| 69 |