AuthItemFixture::init()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace app\fixtures;
4
5
use roaresearch\yii2\workflow\models\Stage;
6
use yii\test\ActiveFixture;
7
8
/**
9
 * Fixture to load default stage.
10
 *
11
 * @author Angel (Faryshta) Guevara <[email protected]>
12
 */
13
class AuthItemFixture extends ActiveFixture
14
{
15
    /**
16
     * @inheritdoc
17
     */
18
    public function init()
19
    {
20
        $this->tableName = \Yii::$app->authManager->itemTable;
0 ignored issues
show
Bug introduced by
Accessing itemTable on the interface yii\rbac\ManagerInterface suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
21
        parent::init();
22
    }
23
24
    /**
25
     * @inheritdoc
26
     */
27
    public $dataFile = __DIR__ . '/data/auth_item.php';
28
}
29