Code Duplication    Length = 18-20 lines in 3 locations

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

@@ 953-970 (lines=18) @@
950
        return $this->redirect()->toUrl($redirect);
951
    }
952
953
    public function userProfileAction()
954
    {
955
        $viewModel = $this->forward()->dispatch(
956
            'playgrounduser_user',
957
            array(
958
                'controller' => 'playgrounduser_user',
959
                'action' => 'profile',
960
                'id' => $this->game->getIdentifier()
961
            )
962
        );
963
964
        if ($viewModel && $viewModel instanceof \Zend\View\Model\ViewModel) {
965
            $this->layout()->setVariables(array('game' => $this->game));
966
            $viewModel->setVariables(array('game' => $this->game));
967
        }
968
969
        return $viewModel;
970
    }
971
972
    public function cmsPageAction()
973
    {
@@ 972-990 (lines=19) @@
969
        return $viewModel;
970
    }
971
972
    public function cmsPageAction()
973
    {
974
        $viewModel = $this->forward()->dispatch(
975
            'playgroundcms',
976
            array(
977
                'controller' => 'playgroundcms',
978
                'action' => 'index',
979
                'id' => $this->game->getIdentifier(),
980
                'pid' => $this->getEvent()->getRouteMatch()->getParam('pid')
981
            )
982
        );
983
984
        if ($viewModel && $viewModel instanceof \Zend\View\Model\ViewModel) {
985
            $this->layout()->setVariables(array('game' => $this->game));
986
            $viewModel->setVariables(array('game' => $this->game));
987
        }
988
989
        return $viewModel;
990
    }
991
992
    public function cmsListAction()
993
    {
@@ 992-1011 (lines=20) @@
989
        return $viewModel;
990
    }
991
992
    public function cmsListAction()
993
    {
994
995
        $viewModel = $this->forward()->dispatch(
996
            'playgroundcms',
997
            array(
998
                'controller' => 'playgroundcms',
999
                'action' => 'list',
1000
                'id' => $this->game->getIdentifier(),
1001
                'category' => $this->game->getIdentifier()
1002
            )
1003
        );
1004
1005
        if ($viewModel && $viewModel instanceof \Zend\View\Model\ViewModel) {
1006
            $this->layout()->setVariables(array('game' => $this->game));
1007
            $viewModel->setVariables(array('game' => $this->game));
1008
        }
1009
1010
        return $viewModel;
1011
    }
1012
1013
    /**
1014
     *