Esempio n. 1
0
 /**
  * @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;
 }
Esempio n. 2
0
 private function convertGames($games)
 {
     $convertedGames = new Collection();
     foreach ($games as $game) {
         $convertedGames->add(new Game($game));
     }
     return $convertedGames;
 }
Esempio n. 3
0
 /**
  * @param Collection $objects
  *
  * @return $this
  */
 protected function sortObjects($objects)
 {
     return $objects->sortBy(function ($object) {
         return $object->name;
     });
 }