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::hasChildren()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 9
ccs 0
cts 8
cp 0
rs 9.6666
cc 2
eloc 5
nc 2
nop 0
crap 6
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