public function getPreviousGame($entry = null)
    {
        $currentGame = $this->getNextPlayableGame($entry);
        $previousMissionGame = null;

        foreach ($this->missionGames as $missionGame) {
            if ($missionGame->getGame()->getId() === $currentGame->getId()) {
                return $previousMissionGame;
            }

            $previousMissionGame = $missionGame->getGame();
        }

        return null;
    }
public function getPreviousGame($entry = null)
    {
        $currentGame = $this->getNextPlayableGame($entry);
        $previousMissionGame = null;

        foreach ($this->missionGames as $missionGame) {
            if ($missionGame->getGame()->getId() === $currentGame->getId()) {
                return $previousMissionGame;
            }

            $previousMissionGame = $missionGame->getGame();
        }

        return null;
    }
public function getPreviousGame ( $ entry = null ) { $ currentGame = $ this -> getNextPlayableGame ( $ entry ) ; $ previousMissionGame = null ; foreach ( $ this -> missionGames as $ missionGame ) { if ( $ missionGame -> getGame ( ) -> getId ( ) === $ currentGame -> getId ( ) ) { return $ previousMissionGame ; } $ previousMissionGame = $ missionGame -> getGame ( ) ; } return null ; }
Get the previous playable game if any

@return \PlaygroundGame\Entity\Game
Get the previous playable game if any