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.
Completed
Push — master ( af10c0...a54314 )
by Pavel
02:45
created

MaterializedPathQueryTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 13
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A roots() 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;
9
10
/**
11
 * @author PaulZi <[email protected]>
12
 */
13
trait MaterializedPathQueryTrait
14
{
15
    /**
16
     * @return \yii\db\ActiveQuery
17
     */
18 3
    public function roots()
19
    {
20
        /** @var \yii\db\ActiveQuery $this */
21 3
        $class = $this->modelClass;
22 3
        $model = new $class;
23 3
        return $this->andWhere([$model->depthAttribute => $model->rootDepthValue]);
24
    }
25
}
26