Passed
Push — master ( 65662a...ffc20a )
by Wilmer
02:42
created

PasswordResetRequestForm::attributeLabels()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace app\basic\forms;
4
5
use app\basic\models\UserModels;
6
use yii\base\Model;
7
8
/**
9
 * PasswordResetRequestForm is the model behind the password reset request form Web Application Basic.
10
 **/
11
class PasswordResetRequestForm extends Model
12
{
13
    public $email;
14
  
15
	/**
16
     * rules
17
     *
18
	 * @return array the validation rules.
19
	 **/
20
	public function rules()
21
	{
22
		return [
23
			['email', 'trim'],
24
			['email', 'required'],
25
			['email', 'email'],
26
			['email', 'exist',
27
				'targetClass' => UserModels::class,
28
				'filter' => ['status' => UserModels::STATUS_ACTIVE],
29
				'message' => Yii::t('basic', 'There is no user with this email address.'),
0 ignored issues
show
Bug introduced by
The type app\basic\forms\Yii was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
30
			],
31
		];
32
	}
33
}
34