Factory/GameFactory.php
public function createEntity(array $data, $game = false)
    {
        if (false === $game) {
            $game = Game::create();
        }

        if (isset($data['name'])) {
            $game = $game->setName($data['name']);
        }

        if (isset($data['_links'])) {
            $game = $game->setLinks($data['_links']);
        }

        if (isset($data['logo'])) {
            $game = $game->setLogo($data['logo']);
        }

        if (isset($data['box'])) {
            $game = $game->setBox($data['box']);
        }

        if (isset($data['_id'])) {
            $game = $game->setId($data['_id']);
        }

        if (isset($data['giantbomb_id'])) {
            $game = $game->setGiantBombId($data['giantbomb_id']);
        }

        if (isset($data['popularity'])) {
            $game = $game->setPopularity($data['popularity']);
        }

        return $game;
    }
public function createEntity(array $data, $game = false)
    {
        if (false === $game) {
            $game = Game::create();
        }

        if (isset($data['name'])) {
            $game = $game->setName($data['name']);
        }

        if (isset($data['_links'])) {
            $game = $game->setLinks($data['_links']);
        }

        if (isset($data['logo'])) {
            $game = $game->setLogo($data['logo']);
        }

        if (isset($data['box'])) {
            $game = $game->setBox($data['box']);
        }

        if (isset($data['_id'])) {
            $game = $game->setId($data['_id']);
        }

        if (isset($data['giantbomb_id'])) {
            $game = $game->setGiantBombId($data['giantbomb_id']);
        }

        if (isset($data['popularity'])) {
            $game = $game->setPopularity($data['popularity']);
        }

        return $game;
    }
@param array      $data
@param false|Game $game

@return Game