Completed
Push — master ( 32be99...2e9083 )
by
unknown
12:34
created

PriceQuery   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 19
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A withFormulaLines() 0 4 1
A withMainObject() 0 6 1
A withPlan() 0 4 1
1
<?php
2
3
namespace hipanel\modules\finance\models\query;
4
5
use hipanel\modules\finance\models\Plan;
6
use hiqdev\hiart\ActiveQuery;
7
8
class PriceQuery extends \hiqdev\hiart\ActiveQuery
9
{
10
    public function withFormulaLines(): self
11
    {
12
        return $this->addSelect('formula_lines');
13
    }
14
15
    public function withMainObject(): self
16
    {
17
        return $this->addSelect('main_object_id')
18
            ->joinWith('object')
19
            ->limit(-1);
20
    }
21
22
    public function withPlan(): self
23
    {
24
        return $this->joinWith('plan');
25
    }
26
}
27