Code Duplication    Length = 8-8 lines in 2 locations

base/ItemController.php 1 location

@@ 149-156 (lines=8) @@
146
     *
147
     * @return mixed
148
     */
149
    public function actionDelete(string $id)
150
    {
151
        $model = $this->findModel($id);
152
        Yii::$app->getAuthManager()->remove($model->item);
153
        Yii::$app->session->setFlash('success', Yii::t('yii2mod.rbac', 'Item has been removed.'));
154
155
        return $this->redirect(['index']);
156
    }
157
158
    /**
159
     * Assign items

controllers/RuleController.php 1 location

@@ 128-135 (lines=8) @@
125
     *
126
     * @return mixed
127
     */
128
    public function actionDelete(string $id)
129
    {
130
        $model = $this->findModel($id);
131
        Yii::$app->authManager->remove($model->item);
132
        Yii::$app->session->setFlash('success', Yii::t('yii2mod.rbac', 'Rule has been deleted.'));
133
134
        return $this->redirect(['index']);
135
    }
136
137
    /**
138
     * Finds the BizRuleModel based on its primary key value.