Passed
Branch main (d68b9c)
by smiley
09:54
created
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/PayPal.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,21 +49,21 @@  discard block
 block discarded – undo
49 49
 	protected function parseTokenResponse(ResponseInterface $response):AccessToken{
50 50
 		$data = json_decode(decompress_content($response), true);
51 51
 
52
-		if(!is_array($data)){
52
+		if (!is_array($data)) {
53 53
 			throw new ProviderException('unable to parse token response');
54 54
 		}
55 55
 
56
-		foreach(['error_description', 'error'] as $field){
57
-			if(isset($data[$field])){
56
+		foreach (['error_description', 'error'] as $field) {
57
+			if (isset($data[$field])) {
58 58
 				throw new ProviderException('error retrieving access token: "'.$data[$field].'"');
59 59
 			}
60 60
 		}
61 61
 
62 62
 		// @codeCoverageIgnoreStart
63
-		if(isset($data['name'], $data['message'])){
63
+		if (isset($data['name'], $data['message'])) {
64 64
 			$msg = \sprintf('error retrieving access token: "%s" [%s]', $data['message'], $data['name']);
65 65
 
66
-			if(isset($data['links']) && is_array($data['links'])){
66
+			if (isset($data['links']) && is_array($data['links'])) {
67 67
 				$msg .= "\n".implode("\n", array_column($data['links'], 'href'));
68 68
 			}
69 69
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		}
72 72
 		// @codeCoverageIgnoreEnd
73 73
 
74
-		if(!isset($data['access_token'])){
74
+		if (!isset($data['access_token'])) {
75 75
 			throw new ProviderException('token missing');
76 76
 		}
77 77
 
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.