| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | function getScopes(ClientInterface $client, ?string $scope): array |
||
|
|
|||
| 24 | { |
||
| 25 | if (is_null($scope)) { |
||
| 26 | throw new OAuthException('invalid_scope', |
||
| 27 | 'The request is missing the required parameter scope.', |
||
| 28 | 'https://tools.ietf.org/html/rfc6749#section-4.1'); |
||
| 29 | } |
||
| 30 | return explode(' ', $scope); |
||
| 31 | } |
||
| 32 | } |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.