Completed
Push — master ( d70954...669d4a )
by Dmitry
04:38
created

AccountQuery   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 12
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A withValues() 0 7 1
A withBlocking() 0 7 1
1
<?php
2
/**
3
 * Hosting module for HiPanel
4
 *
5
 * @link      https://github.com/hiqdev/hipanel-module-hosting
6
 * @package   hipanel-module-hosting
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hipanel\modules\hosting\models\query;
12
13
use hiqdev\hiart\ActiveQuery;
14
15
/**
16
 * Class AccountQuery
17
 * @package hipanel\modules\hosting\models\query
18
 */
19
class AccountQuery extends ActiveQuery
20
{
21
    /**
22
     * @return $this
23
     */
24
    public function withValues(): self
25
    {
26
        $this->joinWith('values');
27
        $this->andWhere(['with_values' => true]);
28
29
        return $this;
30
    }
31
32
    /**
33
     * @return $this
34
     */
35
    public function withBlocking(): self
36
    {
37
        $this->joinWith('blocking');
38
        $this->andWhere(['with_blocking' => true]);
39
40
        return $this;
41
    }
42
}
43