| 1 | <?php |
||
| 22 | class LoginUserCommand implements CommandInterface |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | protected $email; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var string |
||
| 31 | */ |
||
| 32 | protected $password; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var bool |
||
| 36 | */ |
||
| 37 | protected $login = false; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * LoginUserCommand constructor. |
||
| 41 | * |
||
| 42 | * @param $email |
||
| 43 | * @param $password |
||
| 44 | */ |
||
| 45 | public function __construct($email, $password) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | public function email() |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @param string $email |
||
| 61 | */ |
||
| 62 | public function setEmail($email) |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return string |
||
| 69 | */ |
||
| 70 | public function password() |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @param string $password |
||
| 77 | */ |
||
| 78 | public function setPassword($password) |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @return bool |
||
| 85 | */ |
||
| 86 | public function isLogin() |
||
| 90 | |||
| 91 | /** |
||
| 92 | * @param bool $login |
||
| 93 | */ |
||
| 94 | public function setLogin($login) |
||
| 98 | |||
| 99 | /** |
||
| 100 | * {@inheritdoc} |
||
| 101 | */ |
||
| 102 | public static function loadValidatorMetadata(ClassMetadata $classMetadata) |
||
| 114 | } |
||
| 115 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.