| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3.0261 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | 1 | public function collect(mixed $value, iterable $rules, Result $result): void |
|
| 22 | { |
||
| 23 | 1 | if (!$this->isActive()) { |
|
| 24 | return; |
||
| 25 | } |
||
| 26 | |||
| 27 | 1 | $this->validations[] = [ |
|
| 28 | 'value' => $value, |
||
| 29 | 1 | 'rules' => $rules instanceof Traversable ? iterator_to_array($rules, true) : (array) $rules, |
|
| 30 | 1 | 'result' => $result->isValid(), |
|
| 31 | 1 | 'errors' => $result->getErrors(), |
|
| 32 | ]; |
||
| 55 |
This check looks for private methods that have been defined, but are not used inside the class.