Code Duplication    Length = 7-7 lines in 2 locations

src/Controller/Frontend/PostVoteController.php 2 locations

@@ 916-922 (lines=7) @@
913
                    //$this->getGameService()->addShare($post, $this->user, $this->getRequest()->getServer('REMOTE_ADDR'));
914
                    $this->getGameService()->addShare($post, $this->user);
915
                }
916
            } else {
917
                foreach ($form->getMessages() as $el => $errors) {
918
                    foreach ($errors as $key => $message) {
919
                        $message = $this->getServiceLocator()->get('MvcTranslator')->translate($message);
920
                    }
921
                }
922
            }
923
        }
924
925
        $viewModel = $this->buildView($this->game);
@@ 961-967 (lines=7) @@
958
                if ($result) {
959
                    $statusMail = true;
960
                }
961
            } else {
962
                foreach ($form->getMessages() as $el => $errors) {
963
                    foreach ($errors as $key => $message) {
964
                        $message = $this->getServiceLocator()->get('MvcTranslator')->translate($message);
965
                    }
966
                }
967
            }
968
        }
969
970
        $viewModel = $this->buildView($this->game);