Code Duplication    Length = 18-19 lines in 2 locations

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

@@ 1000-1017 (lines=18) @@
997
998
			$logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate'));
999
1000
			if ($logged) {
1001
				return $this->redirect()->toUrl(
1002
					$this->frontendUrl()->fromRoute(
1003
						$this->game->getClassType(),
1004
						array('id' => $this->game->getIdentifier())
1005
					)
1006
				);
1007
			} else {
1008
				$this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage(
1009
					'Authentication failed. Please try again.'
1010
				);
1011
				return $this->redirect()->toUrl(
1012
					$this->frontendUrl()->fromRoute(
1013
						$this->game->getClassType().'/login',
1014
						array('id' => $this->game->getIdentifier())
1015
					)
1016
				);
1017
			}
1018
		}
1019
1020
		$redirect = $this->frontendUrl()->fromRoute(
@@ 747-765 (lines=19) @@
744
745
			$logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate'));
746
747
			if (!$logged) {
748
				$this->flashMessenger()->addMessage(
749
					'Authentication failed. Please try again.'
750
				);
751
752
				return $this->redirect()->toUrl(
753
					$this->frontendUrl()->fromRoute(
754
						$this->game->getClassType().'/login',
755
						array('id' => $this->game->getIdentifier())
756
					)
757
				);
758
			} else {
759
				return $this->redirect()->toUrl(
760
					$this->frontendUrl()->fromRoute(
761
						$this->game->getClassType().'/index',
762
						array('id' => $this->game->getIdentifier())
763
					)
764
				);
765
			}
766
		}
767
768
		$form->setAttribute(