Passed
Push — master ( f23b67...61a6ec )
by smiley
01:37
created
src/MusicBrainz/MusicBrainz.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -86,13 +86,13 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	public function refreshAccessToken(AccessToken $token = null):AccessToken{
88 88
 
89
-		if($token === null){
89
+		if ($token === null) {
90 90
 			$token = $this->storage->getAccessToken($this->serviceName);
91 91
 		}
92 92
 
93 93
 		$refreshToken = $token->refreshToken;
94 94
 
95
-		if(empty($refreshToken)){
95
+		if (empty($refreshToken)) {
96 96
 			throw new ProviderException(sprintf('no refresh token available, token expired [%s]', date('Y-m-d h:i:s A', $token->expires)));
97 97
 		}
98 98
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
 		$newToken = $this->parseTokenResponse($this->http->sendRequest($request));
114 114
 
115
-		if(empty($newToken->refreshToken)){
115
+		if (empty($newToken->refreshToken)) {
116 116
 			$newToken->refreshToken = $refreshToken;
117 117
 		}
118 118
 
@@ -135,15 +135,15 @@  discard block
 block discarded – undo
135 135
 		$method = strtoupper($method);
136 136
 		$token  = $this->storage->getAccessToken($this->serviceName);
137 137
 
138
-		if($token->isExpired()){
138
+		if ($token->isExpired()) {
139 139
 			$token = $this->refreshAccessToken($token);
140 140
 		}
141 141
 
142
-		if(!isset($params['fmt'])){
142
+		if (!isset($params['fmt'])) {
143 143
 			$params['fmt'] = 'json';
144 144
 		}
145 145
 
146
-		if(in_array($method, ['POST', 'PUT', 'DELETE']) && !isset($params['client'])){
146
+		if (in_array($method, ['POST', 'PUT', 'DELETE']) && !isset($params['client'])) {
147 147
 			$params['client'] = $this->options->user_agent; // @codeCoverageIgnore
148 148
 		}
149 149
 
Please login to merge, or discard this patch.