Conditions | 3 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | public function check($value): bool |
||
37 | { |
||
38 | $this->requireParameters(['fields']); |
||
39 | |||
40 | $fields = $this->parameter('fields'); |
||
41 | $this->setParameterTextValues($fields, 'values'); |
||
42 | |||
43 | $validator = $this->validation->getValidator(); |
||
|
|||
44 | $presentValidator = $validator('present'); |
||
45 | |||
46 | $presentValidator->setValidation($this->validation); |
||
47 | $presentValidator->setAttribute($this->attribute); |
||
48 | |||
49 | foreach ($fields as $field) { |
||
50 | if ($this->validation->hasValue($field)) { |
||
51 | return $presentValidator->check($value); |
||
52 | } |
||
53 | } |
||
54 | |||
55 | return true; |
||
56 | } |
||
58 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.