PostQuery   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 14
rs 10
ccs 0
cts 5
cp 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A category() 0 4 1
A behaviors() 0 6 1
1
<?php
2
3
namespace zacksleo\yii2\cms\models\queries;
4
5
use yii\db\ActiveQuery;
6
use creocoder\taggable\TaggableQueryBehavior;
7
8
/**
9
 * Class PostQuery
10
 * @package zacksleo\yii2\cms\models
11
 * @author zacksleo <[email protected]>
12
 */
13
class PostQuery extends ActiveQuery
14
{
15
    public function behaviors()
16
    {
17
        return [
18
            TaggableQueryBehavior::className(),
0 ignored issues
show
Deprecated Code introduced by
The method yii\base\BaseObject::className() has been deprecated with message: since 2.0.14. On PHP >=5.5, use `::class` instead.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
19
        ];
20
    }
21
22
    public function category($id)
23
    {
24
        return $this->andFilterWhere(['like', 'categories', ",$id,"]);
25
    }
26
}
27