Code Duplication    Length = 12-12 lines in 2 locations

src/PlaygroundGame/Controller/Frontend/MissionController.php 1 location

@@ 206-217 (lines=12) @@
203
        // With core shortener helper
204
        $socialLinkUrl = $this->shortenUrl()->shortenUrl($socialLinkUrl);
205
206
        if (!$this->user && !$this->game->getAnonymousAllowed()) {
207
            $redirect = urlencode(
208
                $this->frontendUrl()->fromRoute(
209
                    'mission/result',
210
                    array('id' => $this->game->getIdentifier())
211
                )
212
            );
213
214
            return $this->redirect()->toUrl(
215
                $this->frontendUrl()->fromRoute('zfcuser/register').'?redirect='.$redirect
216
            );
217
        }
218
219
        $form = $this->getServiceLocator()->get('playgroundgame_sharemail_form');
220
        $form->setAttribute('method', 'post');

src/PlaygroundGame/Controller/Frontend/PostVoteController.php 1 location

@@ 130-141 (lines=12) @@
127
                $data = $form->getData();
128
                $post = $this->getGameService()->createPost($data, $this->game, $this->user, $form);
129
130
                if ($post && !empty($this->game->nextStep('play'))) {
131
                    // determine the route where the user should go
132
                    $redirectUrl = $this->frontendUrl()->fromRoute(
133
                        'postvote/'.$this->game->nextStep('play'),
134
                        array('id' => $this->game->getIdentifier())
135
                    );
136
137
                    return $this->redirect()->toUrl($redirectUrl);
138
                }
139
            } else {
140
                $messages = $form->getMessages();
141
                $viewModel = $this->buildView($this->game);
142
                $viewModel->setVariables(array(
143
                    'success' => false,
144
                    'message' => implode(',', $messages['title']),