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.

MaterializedPathQueryTraitTestCase   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 5
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testRoots() 0 7 1
1
<?php
2
/**
3
 * @link https://github.com/paulzi/yii2-materialized-path
4
 * @copyright Copyright (c) 2015 PaulZi <[email protected]>
5
 * @license MIT (https://github.com/paulzi/yii2-materialized-path/blob/master/LICENSE)
6
 */
7
8
namespace paulzi\materializedPath\tests;
9
10
use paulzi\materializedPath\tests\models\Node;
11
use paulzi\materializedPath\tests\models\AttributeModeNode;
12
use paulzi\materializedPath\tests\models\MultipleTreeNode;
13
use Yii;
14
15
/**
16
 * @author PaulZi <[email protected]>
17
 */
18
class MaterializedPathQueryTraitTestCase extends BaseTestCase
19
{
20
    public function testRoots()
21
    {
22
        $data = [1, 14];
23
        $this->assertEquals($data, array_map(function ($value) { return $value->id; }, Node::find()->roots()->all()));
24
        $this->assertEquals($data, array_map(function ($value) { return $value->id; }, AttributeModeNode::find()->roots()->all()));
25
        $this->assertEquals($data, array_map(function ($value) { return $value->id; }, MultipleTreeNode::find()->roots()->all()));
26
    }
27
}