File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
src/Syntax/SteamApi/Containers Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,9 @@ public function __construct($app)
8484 $ this ->isFree = $ app ->is_free ;
8585 $ this ->shortDescription = $ app ->short_description ;
8686 $ this ->supportedLanguages = $ app ->supported_languages ;
87- $ this ->recommendations = $ app -> recommendations ;
88- $ this ->achievements = $ app -> achievements ;
89- $ this ->dlc = $ this ->checkIssetCollection ($ app , 'dlc ' );
87+ $ this ->recommendations = $ this -> checkIssetField ( $ app , ' recommendations ' , $ this -> getFakeRecommendationsObject ()) ;
88+ $ this ->achievements = $ this -> checkIssetField ( $ app , ' achievements ' , $ this -> getFakeAchievementsObject ()) ;
89+ $ this ->dlc = $ this ->checkIssetCollection ($ app , 'dlc ' , new Collection () );
9090
9191 }
9292
@@ -110,5 +110,20 @@ protected function getFakeFullgameObject()
110110 $ object = new \stdClass ();
111111 $ object ->appid = null ;
112112 $ object ->name = 'No parent game found ' ;
113+ return $ object ;
114+ }
115+
116+ protected function getFakeRecommendationsObject ()
117+ {
118+ $ object = new \stdClass ();
119+ $ object ->total = 0 ;
120+ return $ object ;
121+ }
122+
123+ protected function getFakeAchievementsObject ()
124+ {
125+ $ object = new \stdClass ();
126+ $ object ->total = 0 ;
127+ return $ object ;
113128 }
114129}
You can’t perform that action at this time.
0 commit comments