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

AccountQuery::withBlocking()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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