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

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