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
Pull Request — master (#678)
by Henrique
05:02
created

ResultRecursiveIterator   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 1
cbo 2
dl 0
loc 22
ccs 0
cts 16
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A hasChildren() 0 9 2
A getChildren() 0 9 2
1
<?php
2
3
/*
4
 * This file is part of Respect/Validation.
5
 *
6
 * (c) Alexandre Gomes Gaigalas <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the "LICENSE.md"
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Respect\Validation;
13
14
use RecursiveIterator;
15
16
final class ResultRecursiveIterator extends ResultIterator implements RecursiveIterator
17
{
18
    public function hasChildren(): bool
19
    {
20
        $current = $this->current();
21
        if (null === $current) {
22
            return false;
23
        }
24
25
        return $current->hasChildren();
26
    }
27
28
    public function getChildren():? self
29
    {
30
        $current = $this->current();
31
        if (null === $current) {
32
            return null;
33
        }
34
35
        return new self($current);
36
    }
37
}
38