Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Push — 0.9 ( 7d978d...1ce8ac )
by Henrique
07:01 queued 01:39
created

ExceptionIterator   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%
Metric Value
wmc 5
lcom 1
cbo 1
dl 0
loc 24
ccs 10
cts 10
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 2
A hasChildren() 0 8 2
A getChildren() 0 4 1
1
<?php
2
namespace Respect\Validation;
3
4
use RecursiveArrayIterator;
5
use Respect\Validation\Exceptions\AbstractNestedException;
6
7
class ExceptionIterator extends RecursiveArrayIterator
8
{
9
    protected $fullRelated;
10
11 6
    public function __construct($target, $fullRelated = false)
12
    {
13 6
        $this->fullRelated = $fullRelated;
14 6
        parent::__construct(is_array($target) ? $target : array($target));
15 6
    }
16
17 6
    public function hasChildren()
18
    {
19 6
        if (!$this->current() instanceof AbstractNestedException) {
20 5
            return false;
21
        } else {
22 6
            return (boolean) $this->current()->getRelated($this->fullRelated);
23
        }
24
    }
25
26 6
    public function getChildren()
27
    {
28 6
        return new static($this->current()->getRelated($this->fullRelated), $this->fullRelated);
29
    }
30
}
31