| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | 34 | public function tokenPermissions($accessToken) |
|
| 34 | { |
||
| 35 | 34 | $tokenPermissions = $accessToken->permissions; |
|
| 36 | |||
| 37 | 34 | if (! is_array($tokenPermissions)) { |
|
| 38 | 1 | return []; |
|
| 39 | } |
||
| 40 | |||
| 41 | 33 | $apiPermissions = $this->apiPermissions(); |
|
| 42 | |||
| 43 | 33 | return array_intersect($tokenPermissions, $apiPermissions); |
|
| 44 | } |
||
| 68 |