Completed
Push — master ( 0012a2...099852 )
by Dmitry
08:38
created

TariffQuery   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A details() 0 12 1
A byId() 0 4 1
1
<?php
2
3
namespace hipanel\modules\finance\models\query;
4
5
class TariffQuery extends \hiqdev\hiart\ActiveQuery
6
{
7
    public function details()
8
    {
9
        $this->andWhere([
10
            'show_final' => true,
11
            'show_deleted' => true,
12
            'with_resources' => true,
13
        ]);
14
15
        $this->joinWith('resources');
16
17
        return $this;
18
    }
19
20
    public function byId($id)
21
    {
22
        return $this->andWhere(['id' => $id]);
23
    }
24
}
25