Code Duplication    Length = 18-20 lines in 4 locations

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

@@ 968-985 (lines=18) @@
965
        return $this->redirect()->toUrl($redirect);
966
    }
967
968
    public function userProfileAction()
969
    {
970
        $viewModel = $this->forward()->dispatch(
971
            'playgrounduser_user',
972
            array(
973
                'controller' => 'playgrounduser_user',
974
                'action' => 'profile',
975
                'id' => $this->game->getIdentifier()
976
            )
977
        );
978
979
        if ($viewModel && $viewModel instanceof \Zend\View\Model\ViewModel) {
980
            $this->layout()->setVariables(array('game' => $this->game));
981
            $viewModel->setVariables(array('game' => $this->game));
982
        }
983
984
        return $viewModel;
985
    }
986
987
    public function userresetAction()
988
    {
@@ 1008-1025 (lines=18) @@
1005
        return $viewModel;
1006
    }
1007
1008
    public function ajaxforgotAction()
1009
    {
1010
        $view = $this->forward()->dispatch(
1011
            'playgrounduser_forgot',
1012
            array(
1013
                'controller' => 'playgrounduser_forgot',
1014
                'action' => 'ajaxforgot',
1015
                'id' => $this->game->getIdentifier()
1016
            )
1017
        );
1018
1019
        if ($view && $view instanceof \Zend\View\Model\ViewModel) {
1020
            $this->layout()->setVariables(array('game' => $this->game));
1021
            $view->setVariables(array('game' => $this->game));
1022
        }
1023
1024
        return $view;
1025
    }
1026
1027
    public function cmsPageAction()
1028
    {
@@ 1027-1045 (lines=19) @@
1024
        return $view;
1025
    }
1026
1027
    public function cmsPageAction()
1028
    {
1029
        $viewModel = $this->forward()->dispatch(
1030
            'playgroundcms',
1031
            array(
1032
                'controller' => 'playgroundcms',
1033
                'action' => 'index',
1034
                'id' => $this->game->getIdentifier(),
1035
                'pid' => $this->getEvent()->getRouteMatch()->getParam('pid')
1036
            )
1037
        );
1038
1039
        if ($viewModel && $viewModel instanceof \Zend\View\Model\ViewModel) {
1040
            $this->layout()->setVariables(array('game' => $this->game));
1041
            $viewModel->setVariables(array('game' => $this->game));
1042
        }
1043
1044
        return $viewModel;
1045
    }
1046
1047
    public function cmsListAction()
1048
    {
@@ 1047-1066 (lines=20) @@
1044
        return $viewModel;
1045
    }
1046
1047
    public function cmsListAction()
1048
    {
1049
        $viewModel = $this->forward()->dispatch(
1050
            'playgroundcms',
1051
            array(
1052
                'controller' => 'playgroundcms',
1053
                'action' => 'list',
1054
                'id' => $this->game->getIdentifier(),
1055
                'category' => $this->game->getIdentifier()
1056
            )
1057
        );
1058
1059
        if ($viewModel && $viewModel instanceof \Zend\View\Model\ViewModel) {
1060
            $this->layout()->setVariables(array('game' => $this->game));
1061
            $viewModel->setVariables(array('game' => $this->game));
1062
        }
1063
1064
        return $viewModel;
1065
    }
1066
1067
    /**
1068
     *
1069
     * @param \PlaygroundGame\Entity\Game $game