File tree Expand file tree Collapse file tree 4 files changed +25
-4
lines changed Expand file tree Collapse file tree 4 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 55 - 5.4
66 - hhvm
77
8+ matrix :
9+ allow_failures :
10+ - php : hhvm
11+ fast_finish : true
12+
813before_script :
914 - composer install
1015
Original file line number Diff line number Diff line change @@ -57,6 +57,11 @@ public function get()
5757 return $ this ;
5858 }
5959
60+ public function getSteamId ()
61+ {
62+ return $ this ->steamId ;
63+ }
64+
6065 /**
6166 * @param string $arguments
6267 *
@@ -253,15 +258,15 @@ protected function getApiKey()
253258 private function convertSteamIdTo64 ()
254259 {
255260 if (is_array ($ this ->steamId )) {
256- $ this -> steamId = array_walk ($ this ->steamId , function (&$ id , $ key ) {
261+ array_walk ($ this ->steamId , function (&$ id , $ key ) {
257262 if (strpos ($ id , ': ' ) !== false ) {
258263 // Convert the id to all types and grab the 64 bit version
259- return $ this ->convertToAll ($ this -> steamId )[ 2 ] ;
264+ $ id = $ this ->convertToAll ($ id )-> id64 ;
260265 }
261266 });
262267 } elseif (strpos (': ' , $ this ->steamId ) !== false ) {
263268 // Convert the id to all types and grab the 64 bit version
264- $ this ->steamId = $ this ->convertToAll ($ this ->steamId )[ 2 ] ;
269+ $ this ->steamId = $ this ->convertToAll ($ this ->steamId )-> id64 ;
265270 }
266271 }
267272}
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ private function convertToID32()
7878 private function convertToID64 ()
7979 {
8080 $ formatted = bcadd ($ this ->rawValue , self ::$ id64Base , 0 );
81- $ this ->formatted ->{self ::$ ID64 } = $ formatted ;
81+ $ this ->formatted ->{self ::$ ID64 } = ( int ) $ formatted ;
8282 }
8383
8484 private function convertToID3 ()
Original file line number Diff line number Diff line change 33/** @group User */
44class UserTest extends BaseTester {
55
6+ /** @test */
7+ public function it_accepts_an_array_of_steam_ids ()
8+ {
9+ $ steamIds = [$ this ->id32 , $ this ->altId64 ];
10+
11+ $ userService = $ this ->steamClient ->user ($ steamIds );
12+
13+ $ this ->assertCount (2 , $ userService ->getSteamId ());
14+ $ this ->assertEquals ($ this ->id64 , $ userService ->getSteamId ()[0 ]);
15+ }
16+
617 /** @test */
718 public function it_gets_the_base_users_player_summary ()
819 {
You can’t perform that action at this time.
0 commit comments