Code Duplication    Length = 11-11 lines in 2 locations

src/PlaygroundGame/Controller/Frontend/PostVoteController.php 2 locations

@@ 137-147 (lines=11) @@
134
            }
135
        }
136
137
        if (! $game->getForm()) {
138
            return $this->redirect()->toUrl(
139
                $this->frontendUrl()->fromRoute(
140
                    'postvote',
141
                    array(
142
                        'id' => $identifier,
143
                        
144
                    )
145
                )
146
            );
147
        }
148
149
        $form = $sg->createFormFromJson($game->getForm()->getForm(), 'postvoteForm');
150
@@ 318-328 (lines=11) @@
315
        // Je recherche le post associé à entry + status == 0. Si non trouvé, je redirige vers home du jeu.
316
        $post = $sg->getPostVotePostMapper()->findById($postId);
317
318
        if (! $post || $post->getStatus() === 9) {
319
            return $this->redirect()->toUrl(
320
                $this->frontendUrl()->fromRoute(
321
                    'postvote',
322
                    array(
323
                        'id' => $identifier,
324
                        
325
                    )
326
                )
327
            );
328
        }
329
330
        $formModeration = new Form();
331
        $formModeration->setAttribute('method', 'post');