Code Duplication    Length = 11-11 lines in 2 locations

src/controllers/TariffController.php 2 locations

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