Completed
Push — master ( c22208...64acfb )
by Igor
04:17
created

TagQuery   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A like() 0 5 1
1
<?php
2
3
namespace app\models\query;
4
5
use Yii;
6
use yii\db\ActiveQuery;
7
8
/**
9
 * ActiveQuery for Tag
10
 */
11
class TagQuery extends ActiveQuery
12
{
13
    /**
14
     * `Like` search for value in the field
15
     *
16
     * @param string $field
17
     * @param string $value
18
     * @return yii\db\ActiveQuery
19
     */
20
    public function like($field, $value)
21
    {
22
        $this->andWhere(['like', $field, $value]);
23
        return $this;
24
    }
25
}
26