Passed
Push — master ( 6ad01e...fab003 )
by smiley
01:22
created
src/MusicBrainz/MusicBrainz.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -81,13 +81,13 @@  discard block
 block discarded – undo
81 81
 	 */
82 82
 	public function refreshAccessToken(AccessToken $token = null):AccessToken{
83 83
 
84
-		if($token === null){
84
+		if ($token === null) {
85 85
 			$token = $this->storage->getAccessToken($this->serviceName);
86 86
 		}
87 87
 
88 88
 		$refreshToken = $token->refreshToken;
89 89
 
90
-		if(empty($refreshToken)){
90
+		if (empty($refreshToken)) {
91 91
 			throw new ProviderException(\sprintf('no refresh token available, token expired [%s]', \date('Y-m-d h:i:s A', $token->expires)));
92 92
 		}
93 93
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
 		$newToken = $this->parseTokenResponse($this->http->sendRequest($request));
109 109
 
110
-		if(empty($newToken->refreshToken)){
110
+		if (empty($newToken->refreshToken)) {
111 111
 			$newToken->refreshToken = $refreshToken;
112 112
 		}
113 113
 
@@ -130,15 +130,15 @@  discard block
 block discarded – undo
130 130
 		$method = \strtoupper($method);
131 131
 		$token  = $this->storage->getAccessToken($this->serviceName);
132 132
 
133
-		if($token->isExpired()){
133
+		if ($token->isExpired()) {
134 134
 			$token = $this->refreshAccessToken($token);
135 135
 		}
136 136
 
137
-		if(!isset($params['fmt'])){
137
+		if (!isset($params['fmt'])) {
138 138
 			$params['fmt'] = 'json';
139 139
 		}
140 140
 
141
-		if(\in_array($method, ['POST', 'PUT', 'DELETE']) && !isset($params['client'])){
141
+		if (\in_array($method, ['POST', 'PUT', 'DELETE']) && !isset($params['client'])) {
142 142
 			$params['client'] = $this->options->user_agent; // @codeCoverageIgnore
143 143
 		}
144 144
 
Please login to merge, or discard this patch.
src/Flickr/Flickr.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -243,7 +243,7 @@
 block discarded – undo
243 243
  * @method \Psr\Http\Message\ResponseInterface urlsLookupGroup(array $params = ['url'])
244 244
  * @method \Psr\Http\Message\ResponseInterface urlsLookupUser(array $params = ['url'])
245 245
  */
246
-class Flickr extends OAuth1Provider{
246
+class Flickr extends OAuth1Provider {
247 247
 
248 248
 	public const PERM_READ   = 'read';
249 249
 	public const PERM_WRITE  = 'write';
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
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  * @method \Psr\Http\Message\ResponseInterface ping()
28 28
  * @method \Psr\Http\Message\ResponseInterface root(array $params = ['fields', 'exclude_fields'])
29 29
  */
30
-class MailChimp extends OAuth2Provider implements CSRFToken{
30
+class MailChimp extends OAuth2Provider implements CSRFToken {
31 31
 
32 32
 	protected const API_BASE          = 'https://%s.api.mailchimp.com/3.0';
33 33
 	protected const METADATA_ENDPOINT = 'https://login.mailchimp.com/oauth2/metadata';
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
 		$token = $token ?? $this->storage->getAccessToken($this->serviceName);
51 51
 
52
-		if(!$token instanceof AccessToken){
52
+		if (!$token instanceof AccessToken) {
53 53
 			throw new OAuthException('invalid token'); // @codeCoverageIgnore
54 54
 		}
55 55
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
 		$response = $this->http->sendRequest($request);
62 62
 
63
-		if($response->getStatusCode() !== 200){
63
+		if ($response->getStatusCode() !== 200) {
64 64
 			throw new OAuthException('metadata response error'); // @codeCoverageIgnore
65 65
 		}
66 66
 
Please login to merge, or discard this patch.