Code Duplication    Length = 7-7 lines in 2 locations

micro/mvc/controllers/ViewController.php 1 location

@@ 54-60 (lines=7) @@
51
52
        $this->applyFilters($name, true, $filters, null);
53
54
        if ($actionClass) {
55
            /** @var \Micro\mvc\Action $cl */
56
            $cl = new $actionClass($this->container);
57
            $view = $cl->run();
58
        } else {
59
            $view = $this->{'action' . ucfirst($name)}();
60
        }
61
62
        if (is_object($view)) {
63
            $view->module = get_class($this->module);

micro/mvc/controllers/RichController.php 1 location

@@ 72-78 (lines=7) @@
69
        $this->applyFilters($name, true, $filters, null);
70
71
        $view = null;
72
        if ($actionClass) {
73
            /** @var \Micro\Mvc\Action $cl */
74
            $cl = new $actionClass ($this->container);
75
            $view = $cl->run();
76
        } else {
77
            $view = $this->{'action' . ucfirst($name)}();
78
        }
79
80
        if ($this->response->getContentType() !== $this->format) {
81
            $this->response->setContentType($this->format);