Code Duplication    Length = 11-11 lines in 2 locations

src/controllers/TariffController.php 2 locations

@@ 60-70 (lines=11) @@
57
        ];
58
    }
59
60
    public function actionCreateDomain()
61
    {
62
        $manager = TariffManagerFactory::createByType('domain');
63
64
        if (Yii::$app->request->isPost && $manager->model->load(Yii::$app->request->post())) {
65
            $manager->insert();
66
            return $this->redirect(['view', 'id' => $manager->model->id]);
67
        }
68
69
        return $this->render('domain/create', ['model' => $manager->model]);
70
    }
71
72
    public function actionUpdate($id)
73
    {
@@ 72-82 (lines=11) @@
69
        return $this->render('domain/create', ['model' => $manager->model]);
70
    }
71
72
    public function actionUpdate($id)
73
    {
74
        $manager = TariffManagerFactory::createById($id);
75
76
        if (Yii::$app->request->isPost && $manager->model->load(Yii::$app->request->post())) {
77
            $manager->update();
78
            return $this->redirect(['view', 'id' => $manager->model->id]);
79
        }
80
81
        return $this->render($manager->getType() . '/update', ['model' => $manager->model]);
82
    }
83
}
84