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

ExecQuery   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A all() 0 3 1
A one() 0 3 1
A init() 0 4 1
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