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.

testHasChildrenWithScalarValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
rs 9.4285
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\Test;
12
13
14
use StringTemplate\RecursiveArrayOnlyIterator;
15
16
class RecursiveArrayOnlyIteratorTest extends \PHPUnit_Framework_TestCase
17
{
18
    public function testHasChildrenWithScalarValue()
19
    {
20
        $it = new RecursiveArrayOnlyIterator(array('a' => 'b'));
21
22
        $this->assertFalse($it->hasChildren());
23
    }
24
25
    public function testHasChildrenWithArrayValue()
26
    {
27
        $it = new RecursiveArrayOnlyIterator(array('a' => array()));
28
29
        $this->assertTrue($it->hasChildren());
30
    }
31
32
    public function testHasChildrenWithObjectValue()
33
    {
34
        $it = new RecursiveArrayOnlyIterator(array('a' => new \stdClass()));
35
36
        $this->assertFalse($it->hasChildren());
37
    }
38
}
39