Code Duplication    Length = 4-5 lines in 2 locations

src/Controller/DeleteController.php 1 location

@@ 72-75 (lines=4) @@
69
        $this->viewModel->setEntity($entity);
70
        $e->setResult($this->viewModel);
71
72
        if ($this->deleter->hasErrors()) {
73
            $this->viewModel->setErrors($this->deleter->getErrors());
74
            $this->viewModel->setInputData([$this->id]);
75
        }
76
77
        return $this->viewModel;
78
    }

src/Controller/UpdateController.php 1 location

@@ 77-81 (lines=5) @@
74
        $this->viewModel->setEntity($entity);
75
        $e->setResult($this->viewModel);
76
77
        if ($this->updater->hasErrors()) {
78
            $this->viewModel->setErrors($this->updater->getErrors());
79
            $this->viewModel->setInputData($this->data);
80
            return $this->viewModel;
81
        }
82
83
        if ($this->redirectTo) {
84
            return $this->redirect()->toRoute($this->redirectTo);