Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
61 | 3 | public function getIdentity(AccessTokenInterface $accessToken) |
|
62 | { |
||
63 | 3 | $response = $this->request('GET', 'user', [], $accessToken); |
|
64 | |||
65 | 1 | $hydrator = new ArrayHydrator([ |
|
66 | 1 | 'user_id' => 'id', |
|
67 | 'name' => 'fullname', |
||
68 | 'avatar_url' => 'pictureURL' |
||
69 | ]); |
||
70 | |||
71 | 1 | return $hydrator->hydrate(new User(), $response); |
|
72 | } |
||
74 |