Code Duplication    Length = 10-10 lines in 2 locations

src/components/BaseValidateComponent.php 1 location

@@ 28-37 (lines=10) @@
25
    /**
26
     * Initialize.
27
     */
28
    public function init()
29
    {
30
        if (null === $this->authManager){
31
            $this->setAuthManager(Yii::$app->authManager);
32
        }
33
34
        if (null === $this->authManager){
35
            throw new InvalidConfigException('The authManager is not defined.');
36
        }
37
    }
38
39
    /**
40
     * Returns the authManager (RBAC).

src/models/Rbac.php 1 location

@@ 114-123 (lines=10) @@
111
    /**
112
     * Initialize.
113
     */
114
    public function init()
115
    {
116
        if (null === $this->authManager){
117
            $this->setAuthManager(Yii::$app->authManager);
118
        }
119
120
        if (null === $this->authManager){
121
            throw new InvalidConfigException('The authManager is not defined.');
122
        }
123
    }
124
125
    /**
126
     * @inheritdoc