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 ( 3ef0b6...5f1659 )
by Vadim
35:23 queued 33:20
created

DynamicQuery::behaviors()   B

Complexity

Conditions 5
Paths 4

Size

Total Lines 17
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 17
rs 8.8571
cc 5
eloc 8
nc 4
nop 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: vadim
5
 * Date: 07.03.16
6
 * Time: 2:11
7
 */
8
9
namespace sibds\components;
10
11
12
use creocoder\nestedsets\NestedSetsQueryBehavior;
13
use sibds\behaviors\TrashQueryBehavior;
14
use yii\db\ActiveQuery;
15
16
class DynamicQuery extends ActiveQuery
17
{
18
    public function behaviors()
19
    {
20
        $behaviors = [];
21
22
        $model = $this->modelClass;
23
        //$model = new $model;
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
24
25
        if ($model->hasAttribute($model->removedAttribute)) {
0 ignored issues
show
Bug introduced by
The method hasAttribute cannot be called on $model (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
26
            $behaviors[] = TrashQueryBehavior::className();
27
        }
28
29
        if($model->hasAttribute('lft')&&$model->hasAttribute('rgt')&&$model->hasAttribute('depth')){
0 ignored issues
show
Bug introduced by
The method hasAttribute cannot be called on $model (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
30
            $behaviors[] = NestedSetsQueryBehavior::className();
31
        }
32
33
        return $behaviors;
34
    }
35
}
36