Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
53 | 3 | public function getIdentity(AccessTokenInterface $accessToken) |
|
54 | { |
||
55 | 3 | $response = $this->request('GET', 'user', [], $accessToken); |
|
56 | |||
57 | 1 | $hydrator = new ArrayHydrator([ |
|
58 | 1 | 'uuid' => 'id', |
|
59 | 'display_name' => 'fullname', |
||
60 | ]); |
||
61 | |||
62 | /** @var User $user */ |
||
63 | 1 | $user = $hydrator->hydrate(new User(), $response); |
|
64 | 1 | $user->pictureURL = "https://bitbucket.org/account/{$user->username}/avatar/512/"; |
|
65 | |||
66 | 1 | return $user; |
|
67 | } |
||
69 |