Passed
Push — main ( 543a01...14b063 )
by smiley
01:55
created
src/OAuthOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,6 +40,6 @@
 block discarded – undo
40 40
  * @property array      $curl_multi_options
41 41
  * @property bool       $curl_check_OCSP
42 42
  */
43
-class OAuthOptions extends SettingsContainerAbstract{
43
+class OAuthOptions extends SettingsContainerAbstract {
44 44
 	use OAuthOptionsTrait, HTTPOptionsTrait;
45 45
 }
Please login to merge, or discard this patch.
src/Core/OAuth1Provider.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,11 +83,9 @@
 block discarded – undo
83 83
 
84 84
 		if(empty($data)){
85 85
 			throw new ProviderException('unable to parse token response');
86
-		}
87
-		elseif(isset($data['error'])){
86
+		} elseif(isset($data['error'])){
88 87
 			throw new ProviderException('error retrieving access token: '.$data['error']);
89
-		}
90
-		elseif(!isset($data['oauth_token']) || !isset($data['oauth_token_secret'])){
88
+		} elseif(!isset($data['oauth_token']) || !isset($data['oauth_token_secret'])){
91 89
 			throw new ProviderException('invalid token');
92 90
 		}
93 91
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 /**
22 22
  * Implements an abstract OAuth1 provider with all methods required by the OAuth1Interface.
23 23
  */
24
-abstract class OAuth1Provider extends OAuthProvider implements OAuth1Interface{
24
+abstract class OAuth1Provider extends OAuthProvider implements OAuth1Interface {
25 25
 
26 26
 	/**
27 27
 	 * The request OAuth1 token URL
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 			->withHeader('Content-Length', '0') // tumblr requires a content-length header set
61 61
 		;
62 62
 
63
-		foreach($this->authHeaders as $header => $value){
63
+		foreach ($this->authHeaders as $header => $value) {
64 64
 			$request = $request->withAddedHeader($header, $value);
65 65
 		}
66 66
 
@@ -77,20 +77,20 @@  discard block
 block discarded – undo
77 77
 	protected function parseTokenResponse(ResponseInterface $response, bool $checkCallbackConfirmed = null):AccessToken{
78 78
 		$data = $this->parseQuery(decompress_content($response));
79 79
 
80
-		if(empty($data)){
80
+		if (empty($data)) {
81 81
 			throw new ProviderException('unable to parse token response');
82 82
 		}
83
-		elseif(isset($data['error'])){
83
+		elseif (isset($data['error'])) {
84 84
 			throw new ProviderException('error retrieving access token: '.$data['error']);
85 85
 		}
86
-		elseif(!isset($data['oauth_token']) || !isset($data['oauth_token_secret'])){
86
+		elseif (!isset($data['oauth_token']) || !isset($data['oauth_token_secret'])) {
87 87
 			throw new ProviderException('invalid token');
88 88
 		}
89 89
 
90
-		if(
90
+		if (
91 91
 			$checkCallbackConfirmed
92 92
 			&& (!isset($data['oauth_callback_confirmed']) || $data['oauth_callback_confirmed'] !== 'true')
93
-		){
93
+		) {
94 94
 			throw new ProviderException('oauth callback unconfirmed');
95 95
 		}
96 96
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	protected function getSignature(string $url, array $params, string $method, string $accessTokenSecret = null):string{
134 134
 		$parsed = parseUrl($url);
135 135
 
136
-		if(!isset($parsed['host']) || !isset($parsed['scheme']) || !in_array($parsed['scheme'], ['http', 'https'], true)){
136
+		if (!isset($parsed['host']) || !isset($parsed['scheme']) || !in_array($parsed['scheme'], ['http', 'https'], true)) {
137 137
 			throw new ProviderException('getSignature: invalid url');
138 138
 		}
139 139
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 		]);
151 151
 
152 152
 		// https://tools.ietf.org/html/rfc5849#section-3.4.2
153
-		$key  = array_map('rawurlencode', [
153
+		$key = array_map('rawurlencode', [
154 154
 			$this->options->secret,
155 155
 			$accessTokenSecret ?? ''
156 156
 		]);
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 			$token->accessTokenSecret
198 198
 		);
199 199
 
200
-		if(isset($query['oauth_session_handle'])){
200
+		if (isset($query['oauth_session_handle'])) {
201 201
 			$parameters['oauth_session_handle'] = $query['oauth_session_handle']; // @codeCoverageIgnore
202 202
 		}
203 203
 
Please login to merge, or discard this patch.