Completed
Push — master ( 9101e8...625686 )
by Dmitry
13:37
created

PriceQuery   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 14
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A withFormulaLines() 0 4 1
A withMainObject() 0 6 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