Passed
Push — master ( b313ea...47c9db )
by Roman
03:00
created

ExecQuery::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * @link https://github.com/zhuravljov/yii2-queue-monitor
4
 * @copyright Copyright (c) 2017 Roman Zhuravlev
5
 * @license http://opensource.org/licenses/BSD-3-Clause
6
 */
7
8
namespace zhuravljov\yii\queue\monitor\records;
9
10
use yii\db\ActiveQuery;
11
12
/**
13
 * Exec Query
14
 *
15
 * @author Roman Zhuravlev <[email protected]>
16
 */
17
class ExecQuery extends ActiveQuery
18
{
19
    /**
20
     * @inheritdoc
21
     */
22
    public function init()
23
    {
24
        parent::init();
25
        $this->alias('exec');
26
    }
27
28
    /**
29
     * @inheritdoc
30
     * @return ExecRecord[]|array
31
     */
32
    public function all($db = null)
33
    {
34
        return parent::all($db);
35
    }
36
37
    /**
38
     * @inheritdoc
39
     * @return ExecRecord|array|null
40
     */
41
    public function one($db = null)
42
    {
43
        return parent::one($db);
0 ignored issues
show
Bug Best Practice introduced by
The expression return parent::one($db) also could return the type yii\db\ActiveRecord which is incompatible with the return type mandated by yii\db\QueryInterface::one() of boolean|array.
Loading history...
44
    }
45
}
46