Code Duplication    Length = 11-16 lines in 2 locations

src/Controller/Frontend/PostVoteController.php 1 location

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

src/Controller/Frontend/GameController.php 1 location

@@ 1180-1190 (lines=11) @@
1177
                        array('id' => $this->game->getIdentifier())
1178
                    )
1179
                );
1180
            } else {
1181
                $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage(
1182
                    'Authentication failed. Please try again.'
1183
                );
1184
                return $this->redirect()->toUrl(
1185
                    $this->frontendUrl()->fromRoute(
1186
                        $this->game->getClassType().'/login',
1187
                        array('id' => $this->game->getIdentifier())
1188
                    )
1189
                );
1190
            }
1191
        }
1192
1193
        $redirect = $this->frontendUrl()->fromRoute(