GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

RecursiveArrayOnlyIterator::hasChildren()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 2
nc 2
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of library-template
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @author Nicolò Martini <[email protected]>
9
 */
10
11
namespace StringTemplate;
12
13
/**
14
 * Class RecursiveArrayOnlyIterator
15
 *
16
 * It's like RecursiveArrayIterator, but prevents it to iterate through objects
17
 *
18
 * @package StringTemplate
19
 */
20
class RecursiveArrayOnlyIterator extends \RecursiveArrayIterator
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function hasChildren()
26
    {
27
        return is_array($this->current()) || $this->current() instanceof \Traversable;
28
    }
29
30
}