Code Duplication    Length = 11-16 lines in 2 locations

src/Controller/Frontend/PostVoteController.php 1 location

@@ 67-82 (lines=16) @@
64
                        )
65
                    )
66
                );
67
            } else {
68
                $this->flashMessenger()->addMessage(
69
                    $this->getServiceLocator()->get('MvcTranslator')->translate('Your Post is waiting for validation')
70
                );
71
72
                return $this->redirect()->toUrl(
73
                    $this->frontendUrl()->fromRoute(
74
                        'postvote/post',
75
                        array(
76
                            'id' => $this->game->getIdentifier(),
77
                            'post' => $postId,
78
                            
79
                        )
80
                    )
81
                );
82
            }
83
        }
84
85
        if (! $this->game->getForm()) {

src/Controller/Frontend/GameController.php 1 location

@@ 1159-1169 (lines=11) @@
1156
                        array('id' => $this->game->getIdentifier())
1157
                    )
1158
                );
1159
            } else {
1160
                $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage(
1161
                    'Authentication failed. Please try again.'
1162
                );
1163
                return $this->redirect()->toUrl(
1164
                    $this->frontendUrl()->fromRoute(
1165
                        $this->game->getClassType().'/login',
1166
                        array('id' => $this->game->getIdentifier())
1167
                    )
1168
                );
1169
            }
1170
        }
1171
1172
        $redirect = $this->frontendUrl()->fromRoute(