| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | public function collect(mixed $value, Result $result, callable|iterable|object|string|null $rules = null): void |
||
| 24 | { |
||
| 25 | if (!$this->isActive()) { |
||
| 26 | return; |
||
| 27 | } |
||
| 28 | |||
| 29 | if ($rules instanceof Traversable) { |
||
| 30 | $rules = iterator_to_array($rules); |
||
| 31 | } |
||
| 32 | |||
| 33 | |||
| 34 | $this->validations[] = [ |
||
| 35 | 'value' => $value, |
||
| 36 | 'rules' => $rules, |
||
| 37 | 'result' => $result->isValid(), |
||
| 38 | 'errors' => $result->getErrors(), |
||
| 39 | ]; |
||
| 62 |
This check looks for private methods that have been defined, but are not used inside the class.