We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Total Complexity | 10 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Coverage | 91.3% |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | class RecursiveExceptionIterator implements RecursiveIterator, Countable |
||
| 20 | { |
||
| 21 | private $exceptions; |
||
| 22 | |||
| 23 | 3 | public function __construct(NestedValidationException $parent) |
|
| 24 | { |
||
| 25 | 3 | $this->exceptions = $parent->getRelated(); |
|
| 26 | 3 | } |
|
| 27 | |||
| 28 | public function count() |
||
| 29 | { |
||
| 30 | return $this->exceptions->count(); |
||
| 31 | } |
||
| 32 | |||
| 33 | 2 | public function hasChildren() |
|
| 34 | { |
||
| 35 | 2 | if (!$this->valid()) { |
|
| 36 | 1 | return false; |
|
| 37 | } |
||
| 38 | |||
| 39 | 1 | return $this->current() instanceof NestedValidationException; |
|
| 40 | } |
||
| 41 | |||
| 42 | 1 | public function getChildren() |
|
| 45 | } |
||
| 46 | |||
| 47 | 1 | public function current() |
|
| 48 | { |
||
| 49 | 1 | return $this->exceptions->current(); |
|
| 50 | } |
||
| 51 | |||
| 52 | 1 | public function key() |
|
| 53 | { |
||
| 54 | 1 | return $this->exceptions->key(); |
|
| 55 | } |
||
| 56 | |||
| 57 | 1 | public function next(): void |
|
| 58 | { |
||
| 59 | 1 | $this->exceptions->next(); |
|
| 60 | 1 | } |
|
| 61 | |||
| 62 | 1 | public function rewind(): void |
|
| 63 | { |
||
| 64 | 1 | $this->exceptions->rewind(); |
|
| 65 | 1 | } |
|
| 66 | |||
| 67 | 2 | public function valid() |
|
| 70 | } |
||
| 71 | } |
||
| 72 |