@@ -17,7 +17,7 @@ |
||
| 17 | 17 | /** |
| 18 | 18 | * @link https://docs.gitlab.com/ee/api/README.html |
| 19 | 19 | */ |
| 20 | -class GitLabV4Endpoints extends EndpointMap{ |
|
| 20 | +class GitLabV4Endpoints extends EndpointMap { |
|
| 21 | 21 | |
| 22 | 22 | protected $API_BASE = '/v4'; |
| 23 | 23 | |
@@ -132,7 +132,7 @@ |
||
| 132 | 132 | * @method \Psr\Http\Message\ResponseInterface usersSuggestionsSlugMembers(string $slug, array $params = ['lang']) |
| 133 | 133 | * @method \Psr\Http\Message\ResponseInterface verifyCredentials(array $params = ['include_entities', 'skip_status']) |
| 134 | 134 | */ |
| 135 | -class TwitterCC extends OAuth2Provider implements ClientCredentials{ |
|
| 135 | +class TwitterCC extends OAuth2Provider implements ClientCredentials { |
|
| 136 | 136 | |
| 137 | 137 | protected const AUTH_ERRMSG = 'TwitterCC only supports Client Credentials Grant, use the Twitter OAuth1 class for authentication instead.'; |
| 138 | 138 | |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | */ |
| 19 | -class BitbucketEndpoints extends EndpointMap{ |
|
| 19 | +class BitbucketEndpoints extends EndpointMap { |
|
| 20 | 20 | |
| 21 | 21 | protected $API_BASE = '/2.0'; |
| 22 | 22 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | /** |
| 18 | 18 | * @link https://developer.paypal.com/docs/api/identity/v1/ |
| 19 | 19 | */ |
| 20 | -class PayPalEndpoints extends EndpointMap{ |
|
| 20 | +class PayPalEndpoints extends EndpointMap { |
|
| 21 | 21 | |
| 22 | 22 | protected $me = [ |
| 23 | 23 | 'path' => '/v1/identity/oauth2/userinfo', |
@@ -44,21 +44,21 @@ discard block |
||
| 44 | 44 | protected function parseTokenResponse(ResponseInterface $response):AccessToken{ |
| 45 | 45 | $data = \json_decode(Psr7\decompress_content($response), true); |
| 46 | 46 | |
| 47 | - if(!\is_array($data)){ |
|
| 47 | + if (!\is_array($data)) { |
|
| 48 | 48 | throw new ProviderException('unable to parse token response'); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - foreach(['error_description', 'error'] as $field){ |
|
| 52 | - if(isset($data[$field])){ |
|
| 51 | + foreach (['error_description', 'error'] as $field) { |
|
| 52 | + if (isset($data[$field])) { |
|
| 53 | 53 | throw new ProviderException('error retrieving access token: "'.$data[$field].'"'); |
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | // @codeCoverageIgnoreStart |
| 58 | - if(isset($data['name'], $data['message'])){ |
|
| 58 | + if (isset($data['name'], $data['message'])) { |
|
| 59 | 59 | $msg = \sprintf('error retrieving access token: "%s" [%s]', $data['message'], $data['name']); |
| 60 | 60 | |
| 61 | - if(isset($data['links']) && \is_array($data['links'])){ |
|
| 61 | + if (isset($data['links']) && \is_array($data['links'])) { |
|
| 62 | 62 | $msg .= "\n".\implode("\n", \array_column($data['links'], 'href')); |
| 63 | 63 | } |
| 64 | 64 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | } |
| 67 | 67 | // @codeCoverageIgnoreEnd |
| 68 | 68 | |
| 69 | - if(!isset($data['access_token'])){ |
|
| 69 | + if (!isset($data['access_token'])) { |
|
| 70 | 70 | throw new ProviderException('token missing'); |
| 71 | 71 | } |
| 72 | 72 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | public function getAccessToken(string $code, string $state = null):AccessToken{ |
| 94 | 94 | |
| 95 | - if($this instanceof CSRFToken){ |
|
| 95 | + if ($this instanceof CSRFToken) { |
|
| 96 | 96 | $this->checkState($state); |
| 97 | 97 | } |
| 98 | 98 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | /** |
| 18 | 18 | * @method \Psr\Http\Message\ResponseInterface me() |
| 19 | 19 | */ |
| 20 | -class MicrosoftGraph extends AzureActiveDirectory{ |
|
| 20 | +class MicrosoftGraph extends AzureActiveDirectory { |
|
| 21 | 21 | |
| 22 | 22 | public const SCOPE_USER_READ = 'User.Read'; |
| 23 | 23 | public const SCOPE_USER_READBASIC_ALL = 'User.ReadBasic.All'; |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | /** |
| 18 | 18 | * @link https://docs.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0 |
| 19 | 19 | */ |
| 20 | -class MicrosoftGraphEndpoints extends EndpointMap{ |
|
| 20 | +class MicrosoftGraphEndpoints extends EndpointMap { |
|
| 21 | 21 | |
| 22 | 22 | protected $API_BASE = '/v1.0'; |
| 23 | 23 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | /** |
| 16 | 16 | * @method \Psr\Http\Message\ResponseInterface me(array $params = ['schema']) |
| 17 | 17 | */ |
| 18 | -class PayPalSandbox extends PayPal{ |
|
| 18 | +class PayPalSandbox extends PayPal { |
|
| 19 | 19 | |
| 20 | 20 | protected $apiURL = 'https://api.sandbox.paypal.com'; |
| 21 | 21 | protected $accessTokenURL = 'https://api.sandbox.paypal.com/v1/oauth2/token'; |