Code Duplication    Length = 11-16 lines in 2 locations

src/Controller/Frontend/GameController.php 1 location

@@ 1168-1178 (lines=11) @@
1165
                        array('id' => $this->game->getIdentifier())
1166
                    )
1167
                );
1168
            } else {
1169
                $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage(
1170
                    'Authentication failed. Please try again.'
1171
                );
1172
                return $this->redirect()->toUrl(
1173
                    $this->frontendUrl()->fromRoute(
1174
                        $this->game->getClassType().'/login',
1175
                        array('id' => $this->game->getIdentifier())
1176
                    )
1177
                );
1178
            }
1179
        }
1180
1181
        $redirect = $this->frontendUrl()->fromRoute(

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()) {