Passed
Push — main ( 94cc2d...6ae869 )
by smiley
02:00
created
src/Discogs/Discogs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
  * @method \Psr\Http\Message\ResponseInterface wantlistRemove(string $username, string $release_id)
72 72
  * @method \Psr\Http\Message\ResponseInterface wantlistUpdate(string $username, string $release_id, array $body = ['notes', 'rating'])
73 73
  */
74
-class Discogs extends OAuth1Provider{
74
+class Discogs extends OAuth1Provider {
75 75
 
76 76
 	protected string $requestTokenURL = 'https://api.discogs.com/oauth/request_token';
77 77
 	protected string $authURL         = 'https://www.discogs.com/oauth/authorize';
Please login to merge, or discard this patch.
src/Imgur/ImgurEndpoints.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
 /**
18 18
  */
19
-class ImgurEndpoints extends EndpointMap{
19
+class ImgurEndpoints extends EndpointMap {
20 20
 
21 21
 	protected array $me = [
22 22
 		'path'          => '/3/account/me',
Please login to merge, or discard this patch.
src/Discord/DiscordEndpoints.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
  * @link https://discordapp.com/developers/docs/intro
19 19
  * @todo
20 20
  */
21
-class DiscordEndpoints extends EndpointMap{
21
+class DiscordEndpoints extends EndpointMap {
22 22
 
23 23
 	protected array $me = [
24 24
 		'path'          => '/users/@me',
Please login to merge, or discard this patch.
src/NPR/NPROneEndpoints.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 /**
18 18
  * @link https://dev.npr.org/api/
19 19
  */
20
-class NPROneEndpoints extends EndpointMap{
20
+class NPROneEndpoints extends EndpointMap {
21 21
 
22 22
 	protected string $API_BASE = 'https://'; // i hate this so much
23 23
 
Please login to merge, or discard this patch.
src/PayPal/PayPalSandbox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
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 string $authURL        = 'https://www.sandbox.paypal.com/connect';
21 21
 	protected string $accessTokenURL = 'https://api.sandbox.paypal.com/v1/oauth2/token';
Please login to merge, or discard this patch.
src/PayPal/PayPalEndpoints.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
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 array $me = [
23 23
 		'path'          => '/v1/identity/oauth2/userinfo',
Please login to merge, or discard this patch.
src/GitLab/GitLabV4Endpoints.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
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 string $API_BASE = '/v4';
23 23
 
Please login to merge, or discard this patch.
src/MailChimp/MailChimp.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
  * @method \Psr\Http\Message\ResponseInterface ping()
30 30
  * @method \Psr\Http\Message\ResponseInterface root(array $params = ['fields', 'exclude_fields'])
31 31
  */
32
-class MailChimp extends OAuth2Provider implements CSRFToken{
32
+class MailChimp extends OAuth2Provider implements CSRFToken {
33 33
 
34 34
 	protected const API_BASE          = 'https://%s.api.mailchimp.com/3.0';
35 35
 	protected const METADATA_ENDPOINT = 'https://login.mailchimp.com/oauth2/metadata';
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
 		$token ??= $this->storage->getAccessToken($this->serviceName);
53 53
 
54
-		if(!$token instanceof AccessToken){
54
+		if (!$token instanceof AccessToken) {
55 55
 			throw new OAuthException('invalid token'); // @codeCoverageIgnore
56 56
 		}
57 57
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 		$response = $this->http->sendRequest($request);
64 64
 
65
-		if($response->getStatusCode() !== 200){
65
+		if ($response->getStatusCode() !== 200) {
66 66
 			throw new OAuthException('metadata response error'); // @codeCoverageIgnore
67 67
 		}
68 68
 
Please login to merge, or discard this patch.
src/PayPal/PayPal.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,21 +47,21 @@  discard block
 block discarded – undo
47 47
 	protected function parseTokenResponse(ResponseInterface $response):AccessToken{
48 48
 		$data = json_decode(decompress_content($response), true);
49 49
 
50
-		if(!is_array($data)){
50
+		if (!is_array($data)) {
51 51
 			throw new ProviderException('unable to parse token response');
52 52
 		}
53 53
 
54
-		foreach(['error_description', 'error'] as $field){
55
-			if(isset($data[$field])){
54
+		foreach (['error_description', 'error'] as $field) {
55
+			if (isset($data[$field])) {
56 56
 				throw new ProviderException('error retrieving access token: "'.$data[$field].'"');
57 57
 			}
58 58
 		}
59 59
 
60 60
 		// @codeCoverageIgnoreStart
61
-		if(isset($data['name'], $data['message'])){
61
+		if (isset($data['name'], $data['message'])) {
62 62
 			$msg = sprintf('error retrieving access token: "%s" [%s]', $data['message'], $data['name']);
63 63
 
64
-			if(isset($data['links']) && is_array($data['links'])){
64
+			if (isset($data['links']) && is_array($data['links'])) {
65 65
 				$msg .= "\n".implode("\n", array_column($data['links'], 'href'));
66 66
 			}
67 67
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		}
70 70
 		// @codeCoverageIgnoreEnd
71 71
 
72
-		if(!isset($data['access_token'])){
72
+		if (!isset($data['access_token'])) {
73 73
 			throw new ProviderException('token missing');
74 74
 		}
75 75
 
Please login to merge, or discard this patch.