Passed
Push — main ( e41c5f...8f9259 )
by smiley
09:50
created
src/Core/OAuth1Provider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 /**
23 23
  * Implements an abstract OAuth1 provider with all methods required by the OAuth1Interface.
24 24
  */
25
-abstract class OAuth1Provider extends OAuthProvider implements OAuth1Interface{
25
+abstract class OAuth1Provider extends OAuthProvider implements OAuth1Interface {
26 26
 
27 27
 	/**
28 28
 	 * The request OAuth1 token URL
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 			->withHeader('Content-Length', '0') // tumblr requires a content-length header set
62 62
 		;
63 63
 
64
-		foreach($this->authHeaders as $header => $value){
64
+		foreach ($this->authHeaders as $header => $value) {
65 65
 			$request = $request->withAddedHeader($header, $value);
66 66
 		}
67 67
 
@@ -82,20 +82,20 @@  discard block
 block discarded – undo
82 82
 	protected function parseTokenResponse(ResponseInterface $response, bool $checkCallbackConfirmed = null):AccessToken{
83 83
 		parse_str(decompress_content($response), $data);
84 84
 
85
-		if(!$data || !is_array($data)){
85
+		if (!$data || !is_array($data)) {
86 86
 			throw new ProviderException('unable to parse token response');
87 87
 		}
88
-		elseif(isset($data['error'])){
88
+		elseif (isset($data['error'])) {
89 89
 			throw new ProviderException('error retrieving access token: '.$data['error']);
90 90
 		}
91
-		elseif(!isset($data['oauth_token']) || !isset($data['oauth_token_secret'])){
91
+		elseif (!isset($data['oauth_token']) || !isset($data['oauth_token_secret'])) {
92 92
 			throw new ProviderException('invalid token');
93 93
 		}
94 94
 
95
-		if(
95
+		if (
96 96
 			$checkCallbackConfirmed
97 97
 			&& (!isset($data['oauth_callback_confirmed']) || $data['oauth_callback_confirmed'] !== 'true')
98
-		){
98
+		) {
99 99
 			throw new ProviderException('oauth callback unconfirmed');
100 100
 		}
101 101
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	protected function getSignature(string $url, array $params, string $method, string $accessTokenSecret = null):string{
146 146
 		$parseURL = parse_url($url);
147 147
 
148
-		if(!isset($parseURL['host']) || !isset($parseURL['scheme']) || !in_array($parseURL['scheme'], ['http', 'https'], true)){
148
+		if (!isset($parseURL['host']) || !isset($parseURL['scheme']) || !in_array($parseURL['scheme'], ['http', 'https'], true)) {
149 149
 			throw new ProviderException('getSignature: invalid url');
150 150
 		}
151 151
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 			$token->accessTokenSecret
206 206
 		);
207 207
 
208
-		if(isset($query['oauth_session_handle'])){
208
+		if (isset($query['oauth_session_handle'])) {
209 209
 			$parameters['oauth_session_handle'] = $query['oauth_session_handle']; // @codeCoverageIgnore
210 210
 		}
211 211
 
Please login to merge, or discard this patch.