Code Duplication    Length = 18-20 lines in 3 locations

src/PlaygroundGame/Controller/Frontend/GameController.php 3 locations

@@ 970-987 (lines=18) @@
967
        return $this->redirect()->toUrl($redirect);
968
    }
969
970
    public function userProfileAction()
971
    {
972
        $viewModel = $this->forward()->dispatch(
973
            'playgrounduser_user',
974
            array(
975
                'controller' => 'playgrounduser_user',
976
                'action' => 'profile',
977
                'id' => $this->game->getIdentifier()
978
            )
979
        );
980
981
        if ($viewModel && $viewModel instanceof \Zend\View\Model\ViewModel) {
982
            $this->layout()->setVariables(array('game' => $this->game));
983
            $viewModel->setVariables(array('game' => $this->game));
984
        }
985
986
        return $viewModel;
987
    }
988
989
    public function cmsPageAction()
990
    {
@@ 989-1007 (lines=19) @@
986
        return $viewModel;
987
    }
988
989
    public function cmsPageAction()
990
    {
991
        $viewModel = $this->forward()->dispatch(
992
            'playgroundcms',
993
            array(
994
                'controller' => 'playgroundcms',
995
                'action' => 'index',
996
                'id' => $this->game->getIdentifier(),
997
                'pid' => $this->getEvent()->getRouteMatch()->getParam('pid')
998
            )
999
        );
1000
1001
        if ($viewModel && $viewModel instanceof \Zend\View\Model\ViewModel) {
1002
            $this->layout()->setVariables(array('game' => $this->game));
1003
            $viewModel->setVariables(array('game' => $this->game));
1004
        }
1005
1006
        return $viewModel;
1007
    }
1008
1009
    public function cmsListAction()
1010
    {
@@ 1009-1028 (lines=20) @@
1006
        return $viewModel;
1007
    }
1008
1009
    public function cmsListAction()
1010
    {
1011
        $viewModel = $this->forward()->dispatch(
1012
            'playgroundcms',
1013
            array(
1014
                'controller' => 'playgroundcms',
1015
                'action' => 'list',
1016
                'id' => $this->game->getIdentifier(),
1017
                'category' => $this->game->getIdentifier()
1018
            )
1019
        );
1020
1021
        if ($viewModel && $viewModel instanceof \Zend\View\Model\ViewModel) {
1022
            $this->layout()->setVariables(array('game' => $this->game));
1023
            $viewModel->setVariables(array('game' => $this->game));
1024
        }
1025
1026
        return $viewModel;
1027
    }
1028
1029
    /**
1030
     *
1031
     * @param \PlaygroundGame\Entity\Game $game