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