Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
67 | 1 | public function getIdentity(AccessTokenInterface $accessToken) |
|
68 | { |
||
69 | $query = [ |
||
70 | 1 | 'steamids' => $accessToken->getUserId() |
|
71 | ]; |
||
72 | |||
73 | 1 | $response = $this->request('GET', 'ISteamUser/GetPlayerSummaries/v0002/', $query, $accessToken); |
|
74 | |||
75 | 1 | $hydrator = new ArrayHydrator([ |
|
76 | 1 | 'steamid' => 'id', |
|
77 | 'personaname' => 'username', |
||
78 | 'realname' => 'fullname' |
||
79 | ]); |
||
80 | |||
81 | 1 | return $hydrator->hydrate(new User(), $response['response']['players'][0]); |
|
82 | } |
||
84 |