Completed
Push — master ( d0e0e5...0154ba )
by Andrii
05:43 queued 03:12
created

ChargeQuery   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 24
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A withCommonObject() 0 7 1
A withLatestCommonObject() 0 7 1
1
<?php
2
3
4
namespace hipanel\modules\finance\models\query;
5
6
7
use hiqdev\hiart\ActiveQuery;
8
9
/**
10
 * Class ChargeQuery
11
 * @package hipanel\modules\finance\models\query
12
 */
13
class ChargeQuery extends ActiveQuery
14
{
15
    /**
16
     * @return $this
17
     */
18
    public function withCommonObject(): self
19
    {
20
        $this->joinWith('commonObject');
21
        $this->andWhere(['with_commonObject' => true]);
22
23
        return $this;
24
    }
25
26
    /**
27
     * @return $this
28
     */
29
    public function withLatestCommonObject(): self
30
    {
31
        $this->joinWith('latestCommonObject');
32
        $this->andWhere(['with_latestCommonObject' => true]);
33
34
        return $this;
35
    }
36
}
37