| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 1 | public function validate(FieldInterface $field, InputModel $model, InputValidation $validation) |
|
| 30 | { |
||
| 31 | 1 | if ($model->getInput($field) === null) { |
|
| 32 | 1 | $model->setError( |
|
| 33 | 1 | $field, |
|
| 34 | 1 | $this->error ?: lang::text("mindplay/kissform", "required", ["field" => $validation->getLabel($field)]) |
|
| 35 | ); |
||
| 36 | } |
||
| 37 | 1 | } |
|
| 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.