Code Duplication    Length = 6-6 lines in 2 locations

src/controllers/DefaultController.php 2 locations

@@ 77-82 (lines=6) @@
74
    public function actionCreate($lang = null)
75
    {
76
        $request = Yii::$app->getRequest();
77
        if ($request->getIsPost()) {
78
            if ($this->_service->create($request->post())) {
79
                return $this->redirect(['index']);
80
            }
81
            $errors = $this->_service->getErrors();
82
        }
83
        $template = $this->_service->getModel();
84
        $translation = $this->_service->getTranslationModel(null, $lang);
85
@@ 127-132 (lines=6) @@
124
        $translation = $this->_service->getTranslationModel($id, $lang);
125
126
        $request = Yii::$app->getRequest();
127
        if ($request->getIsPost()) {
128
            if ($this->_service->update($translation, $request->post())) {
129
                return $this->redirect(['view', 'id' => $id]);
130
            }
131
            $errors = $this->_service->getErrors();
132
        }
133
134
        $template = $this->findModel($id);
135
        $defaultTranslation = $this->_service->getDefaultTranslationModel($id);