| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function isValid($input, array $context = []): bool |
||
| 25 | { |
||
| 26 | if (is_countable($input)) { |
||
| 27 | return count($input) === $this->size; |
||
| 28 | } |
||
| 29 | |||
| 30 | if (is_iterable($input)) { |
||
| 31 | $count = 0; |
||
| 32 | foreach ($input as $v) { |
||
| 33 | $count++; |
||
| 34 | } |
||
| 35 | |||
| 36 | return $count === $this->size; |
||
| 37 | } |
||
| 38 | |||
| 39 | return false; |
||
| 40 | } |
||
| 47 |