Code Duplication    Length = 13-14 lines in 2 locations

application/controllers/MovieController.php 1 location

@@ 90-102 (lines=13) @@
87
        $this->view->paginator = $this->_helper->createPaginator(\mQueue\Model\MovieMapper::getFilteredQuery($filters, $sort));
88
    }
89
90
    public function viewAction()
91
    {
92
        if ($this->getRequest()->getParam('id')) {
93
            $this->view->movie = \mQueue\Model\MovieMapper::find($this->getRequest()->getParam('id'));
94
        }
95
96
        if (!$this->view->movie) {
97
            throw new Exception($this->view->translate('Movie not found'));
98
        }
99
100
        $this->view->users = \mQueue\Model\UserMapper::fetchAll();
101
        $this->view->movieActivity = $this->_helper->createPaginator(\mQueue\Model\StatusMapper::getActivityQuery($this->view->movie));
102
    }
103
104
    public function addAction()
105
    {

application/controllers/UserController.php 1 location

@@ 81-94 (lines=14) @@
78
        \mQueue\Model\User::setCurrent(null);
79
    }
80
81
    public function viewAction()
82
    {
83
        if ($this->getRequest()->getParam('id')) {
84
            $this->view->user = \mQueue\Model\UserMapper::find($this->getRequest()->getParam('id'));
85
        } else {
86
            $this->view->user = \mQueue\Model\User::getCurrent();
87
        }
88
89
        if (!$this->view->user) {
90
            throw new Exception($this->view->translate('User not found'));
91
        }
92
93
        $this->view->userActivity = $this->_helper->createPaginator(\mQueue\Model\StatusMapper::getActivityQuery($this->view->user));
94
    }
95
}
96