for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace app\basic\forms;
use app\basic\models\UserModels;
use yii\base\Model;
use yii\helpers\Yii;
class ResetPasswordForm extends Model
{
public $password;
/**
* {@inheritdoc}
**/
public function rules()
return [
['password', 'required'],
['password', 'string', 'min' => 6],
];
}
* atributeLabels.
*
* Translate Atribute Labels.
public function attributeLabels()
'password' => Yii::getApp()->t('basic', 'Password'),
yii\helpers\BaseYii::getApp()
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
ignore-deprecated
'password' => /** @scrutinizer ignore-deprecated */ Yii::getApp()->t('basic', 'Password'),
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
* Resets password.
* @return bool if password was reset.
public function resetPassword()
$user = new UserModels;
$user->setPassword($this->password);
$user->removePasswordResetToken();
return $user->save(false);
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.