/** * @param $apps * * @return Collection */ protected function convertGames($apps) { $convertedApps = new Collection(); foreach ($apps as $app) { if (isset($app->data)) { $convertedApps->add(new AppContainer($app->data)); } } return $convertedApps; }
private function convertGames($games) { $convertedGames = new Collection(); foreach ($games as $game) { $convertedGames->add(new Game($game)); } return $convertedGames; }