Code Duplication    Length = 11-11 lines in 2 locations

modules/option/controllers/ManagementController.php 1 location

@@ 75-85 (lines=11) @@
72
     * @param string $key
73
     * @return mixed
74
     */
75
    public function actionUpdate($namespace, $key)
76
    {
77
        $model = $this->findModel($namespace, $key);
78
79
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
80
            return $this->redirect(['view', 'namespace' => $model->namespace, 'key' => $model->key]);
81
        }
82
        return $this->render('update', [
83
            'model' => $model,
84
        ]);
85
    }
86
87
    /**
88
     * Finds the Option model based on its primary key value.

modules/page/controllers/ManagementController.php 1 location

@@ 70-80 (lines=11) @@
67
     * @param integer $id
68
     * @return mixed
69
     */
70
    public function actionUpdate($id)
71
    {
72
        $model = $this->findModel($id);
73
74
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
75
            return $this->redirect(['view', 'id' => $model->id]);
76
        }
77
        return $this->render('update', [
78
            'model' => $model,
79
        ]);
80
    }
81
82
    /**
83
     * Finds the Page model based on its primary key value.