Completed
Push — master ( 88ba9b...8a3d51 )
by Andrii
03:03
created

Query   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A apply() 0 12 3
1
<?php
2
3
namespace hiapi\query;
4
5
class Query extends \yii\db\Query
6
{
7
    public function apply(Specification $specification)
8
    {
9
        if ($specification->where) {
10
            $this->andWhere($specification->where);
11
        }
12
13
        if ($specification->limit) {
14
            $this->limit($specification->limit);
15
        }
16
17
        return $this;
18
    }
19
}
20