AuthItemFixture   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 1

1 Method

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