Conditions | 3 |
Paths | 2 |
Total Lines | 22 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
64 | public function getIdentity(AccessTokenInterface $accessToken) |
||
65 | { |
||
66 | $this->consumerToken = $accessToken; |
||
67 | |||
68 | $result = $this->request( |
||
69 | 'GET', |
||
70 | 'user/info', |
||
71 | [], |
||
72 | $accessToken |
||
73 | ); |
||
74 | |||
75 | if (!isset($result['response'], $result['response']['user']) || !$result['response']['user']) { |
||
76 | throw new InvalidResponse( |
||
77 | 'API response without user inside JSON' |
||
78 | ); |
||
79 | } |
||
80 | |||
81 | $hydrator = new ArrayHydrator([ |
||
82 | 'name' => 'id' |
||
83 | ]); |
||
84 | |||
85 | return $hydrator->hydrate(new User(), $result['response']['user']); |
||
86 | } |
||
88 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths