| 1 | <?php |
||
| 14 | class CheckRequired implements ValidatorInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var string|null |
||
| 18 | */ |
||
| 19 | private $error; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param string $error optional custom error message |
||
|
|
|||
| 23 | */ |
||
| 24 | 10 | public function __construct($error = null) |
|
| 28 | |||
| 29 | 1 | public function validate(FieldInterface $field, InputModel $model, InputValidation $validation) |
|
| 38 | } |
||
| 39 |
This check looks for
@paramannotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.