Code Duplication    Length = 8-9 lines in 2 locations

app/controllers/ControllerBase.php 1 location

@@ 114-121 (lines=8) @@
111
    }
112
113
114
    public function deleteAction($id = null)
115
    {
116
        if ($this->verifyAccessAction($this->controller, "write")) {
117
            $object = call_user_func($this->model . '::findFirst', "$id");
118
            $object->delete();
119
        }
120
        $this->response->redirect("$this->controller/index");
121
    }
122
123
    public function asAdminAction()
124
    {

app/controllers/TachesController.php 1 location

@@ 37-45 (lines=9) @@
34
        $this->useCaseUpdate($projet);
35
    }
36
37
    public function deleteAction($id = null)
38
    {
39
        $object = call_user_func($this->model . '::findFirst', "$id");
40
        $object->delete();
41
42
        $this->useCaseUpdate($object);
43
        $this->response->redirect("$this->controller/index");
44
        $this->response->redirect($_SERVER['HTTP_REFERER'] . "/2");
45
    }
46
47
    public function useCaseUpdate($obj)
48
    {