@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | protected array $authHeaders = ['Accept' => 'application/vnd.twitchtv.v5+json']; |
116 | 116 | protected array $apiHeaders = ['Accept' => 'application/vnd.twitchtv.v5+json']; |
117 | 117 | |
118 | - protected array $defaultScopes = [ |
|
118 | + protected array $defaultScopes = [ |
|
119 | 119 | self::SCOPE_USER_READ_EMAIL, |
120 | 120 | ]; |
121 | 121 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | 'grant_type' => 'client_credentials', |
134 | 134 | ]; |
135 | 135 | |
136 | - if($scopes !== null){ |
|
136 | + if ($scopes !== null) { |
|
137 | 137 | $params['scope'] = implode($this->scopesDelimiter, $scopes); |
138 | 138 | } |
139 | 139 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | ->withBody($this->streamFactory->createStream(http_build_query($params, '', '&', PHP_QUERY_RFC1738))) |
144 | 144 | ; |
145 | 145 | |
146 | - foreach($this->authHeaders as $header => $value){ |
|
146 | + foreach ($this->authHeaders as $header => $value) { |
|
147 | 147 | $request = $request->withAddedHeader($header, $value); |
148 | 148 | } |
149 | 149 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | use chillerlan\OAuth\MagicAPI\EndpointMap; |
13 | 13 | |
14 | -class TwitchEndpoints extends EndpointMap{ |
|
14 | +class TwitchEndpoints extends EndpointMap { |
|
15 | 15 | |
16 | 16 | protected string $API_BASE = '/helix'; |
17 | 17 |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | public function setInstance(string $instance):Mastodon{ |
120 | 120 | $instance = parse_url($instance); |
121 | 121 | |
122 | - if(!isset($instance['scheme']) || !isset($instance['host'])){ |
|
122 | + if (!isset($instance['scheme']) || !isset($instance['host'])) { |
|
123 | 123 | throw new OAuthException('invalid instance URL'); |
124 | 124 | } |
125 | 125 | |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | ->withHeader('Accept-Encoding', 'identity') |
156 | 156 | ->withBody($this->streamFactory->createStream(http_build_query($body, '', '&', PHP_QUERY_RFC1738))); |
157 | 157 | |
158 | - foreach($this->authHeaders as $header => $value){ |
|
158 | + foreach ($this->authHeaders as $header => $value) { |
|
159 | 159 | $request = $request->withHeader($header, $value); |
160 | 160 | } |
161 | 161 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | use chillerlan\OAuth\MagicAPI\EndpointMap; |
13 | 13 | |
14 | -class SpotifyEndpoints extends EndpointMap{ |
|
14 | +class SpotifyEndpoints extends EndpointMap { |
|
15 | 15 | |
16 | 16 | protected string $API_BASE = '/v1'; |
17 | 17 |
@@ -124,7 +124,7 @@ |
||
124 | 124 | protected array $authHeaders = ['Accept' => 'application/vnd.vimeo.*+json;version='.self::API_VERSION]; |
125 | 125 | protected array $apiHeaders = ['Accept' => 'application/vnd.vimeo.*+json;version='.self::API_VERSION]; |
126 | 126 | |
127 | - protected array $defaultScopes = [ |
|
127 | + protected array $defaultScopes = [ |
|
128 | 128 | self::SCOPE_PRIVATE, |
129 | 129 | self::SCOPE_INTERACT, |
130 | 130 | ]; |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | use chillerlan\OAuth\MagicAPI\EndpointMap; |
13 | 13 | |
14 | -class OpenCachingEndpoints extends EndpointMap{ |
|
14 | +class OpenCachingEndpoints extends EndpointMap { |
|
15 | 15 | |
16 | 16 | protected string $API_BASE = '/services'; |
17 | 17 |