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   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A hasChildren() 0 4 2
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
}