Passed
Push — master ( a6fd9c...78040a )
by smiley
01:37
created
src/Patreon/Patreon2.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
  * @method \Psr\Http\Message\ResponseInterface memberId(string $member_id, array $params = ['fields[member]', 'fields[tier]', 'fields[user]'])
24 24
  * @method \Psr\Http\Message\ResponseInterface webhooks(array $params = ['fields[webhook]'])
25 25
  */
26
-class Patreon2 extends PatreonAbstract{
26
+class Patreon2 extends PatreonAbstract {
27 27
 
28 28
 	// wow, consistency...
29 29
 	public const  SCOPE_IDENTITY                  = 'identity';
@@ -35,6 +35,6 @@  discard block
 block discarded – undo
35 35
 	public const  SCOPE_CAMPAIGNS_MEMBERS_EMAIL   = 'campaigns.members[email]';
36 36
 	public const  SCOPE_CAMPAIGNS_MEMBERS_ADDRESS = 'campaigns.members.address';
37 37
 
38
-	protected $endpointMap    = Patreon2Endpoints::class;
38
+	protected $endpointMap = Patreon2Endpoints::class;
39 39
 
40 40
 }
Please login to merge, or discard this patch.
src/Patreon/Patreon2Endpoints.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 Patreon2Endpoints extends EndpointMap{
19
+class Patreon2Endpoints extends EndpointMap {
20 20
 
21 21
 	protected $API_BASE = '/v2';
22 22
 
Please login to merge, or discard this patch.
src/Patreon/Patreon1.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@
 block discarded – undo
20 20
  * @method \Psr\Http\Message\ResponseInterface currentUser()
21 21
  * @method \Psr\Http\Message\ResponseInterface currentUserCampaigns(array $params = ['includes'])
22 22
  */
23
-class Patreon1 extends PatreonAbstract{
23
+class Patreon1 extends PatreonAbstract {
24 24
 
25 25
 	public const SCOPE_USERS         = 'users';
26 26
 	public const SCOPE_PLEDGES_TO_ME = 'pledges-to-me';
27 27
 	public const SCOPE_MY_CAMPAIGN   = 'my-campaign';
28 28
 
29
-	protected $endpointMap    = Patreon1Endpoints::class;
29
+	protected $endpointMap = Patreon1Endpoints::class;
30 30
 
31 31
 }
Please login to merge, or discard this patch.
src/Patreon/Patreon1Endpoints.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 Patreon1Endpoints extends EndpointMap{
19
+class Patreon1Endpoints extends EndpointMap {
20 20
 
21 21
 	protected $API_BASE = '/api';
22 22
 
Please login to merge, or discard this patch.
src/LastFM/LastFM.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
  * @method \Psr\Http\Message\ResponseInterface userGetWeeklyArtistChart(array $params = ['user', 'from', 'to'])
73 73
  * @method \Psr\Http\Message\ResponseInterface userGetWeeklyTrackChart(array $params = ['user', 'from', 'to'])
74 74
  */
75
-class LastFM extends OAuthProvider{
75
+class LastFM extends OAuthProvider {
76 76
 
77 77
 	public const PERIOD_OVERALL = 'overall';
78 78
 	public const PERIOD_7DAY    = '7day';
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
 
120 120
 		$signature = '';
121 121
 
122
-		foreach($params as $k => $v){
123
-			if(!\in_array($k, ['format', 'callback'])){
122
+		foreach ($params as $k => $v) {
123
+			if (!\in_array($k, ['format', 'callback'])) {
124 124
 				$signature .= $k.$v;
125 125
 			}
126 126
 		}
@@ -158,13 +158,13 @@  discard block
 block discarded – undo
158 158
 	protected function parseTokenResponse(ResponseInterface $response):AccessToken{
159 159
 		$data = Psr7\get_json($response, true);
160 160
 
161
-		if(!$data || !\is_array($data)){
161
+		if (!$data || !\is_array($data)) {
162 162
 			throw new ProviderException('unable to parse token response');
163 163
 		}
164
-		elseif(isset($data['error'])){
164
+		elseif (isset($data['error'])) {
165 165
 			throw new ProviderException('error retrieving access token: '.$data['message']);
166 166
 		}
167
-		elseif(!isset($data['session']['key'])){
167
+		elseif (!isset($data['session']['key'])) {
168 168
 			throw new ProviderException('token missing');
169 169
 		}
170 170
 
@@ -217,18 +217,18 @@  discard block
 block discarded – undo
217 217
 		$method = $method ?? 'GET';
218 218
 		$params = $this->requestParams($path, $params ?? [], $body ?? []);
219 219
 
220
-		if($method === 'POST'){
220
+		if ($method === 'POST') {
221 221
 			$body   = $params;
222 222
 			$params = [];
223 223
 		}
224 224
 
225 225
 		$request = $this->requestFactory->createRequest($method, Psr7\merge_query($this->apiURL, $params));
226 226
 
227
-		foreach(\array_merge($this->apiHeaders, $headers ?? []) as $header => $value){
227
+		foreach (\array_merge($this->apiHeaders, $headers ?? []) as $header => $value) {
228 228
 			$request = $request->withAddedHeader($header, $value);
229 229
 		}
230 230
 
231
-		if($method === 'POST'){
231
+		if ($method === 'POST') {
232 232
 			$request = $request->withHeader('Content-Type', 'application/x-www-form-urlencoded');
233 233
 			$body    = $this->streamFactory->createStream(\http_build_query($body, '', '&', \PHP_QUERY_RFC1738));
234 234
 			$request = $request->withBody($body);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -160,11 +160,9 @@
 block discarded – undo
160 160
 
161 161
 		if(!$data || !\is_array($data)){
162 162
 			throw new ProviderException('unable to parse token response');
163
-		}
164
-		elseif(isset($data['error'])){
163
+		} elseif(isset($data['error'])){
165 164
 			throw new ProviderException('error retrieving access token: '.$data['message']);
166
-		}
167
-		elseif(!isset($data['session']['key'])){
165
+		} elseif(!isset($data['session']['key'])){
168 166
 			throw new ProviderException('token missing');
169 167
 		}
170 168
 
Please login to merge, or discard this patch.
src/LastFM/LastFMEndpoints.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
  *
20 20
  * @todo hellooo??? https://twitter.com/codemasher/status/982315427308146689
21 21
  */
22
-class LastFMEndpoints extends EndpointMap{
22
+class LastFMEndpoints extends EndpointMap {
23 23
 
24 24
 	/**
25 25
 	 * @link https://www.last.fm/api/show/album.addTags
Please login to merge, or discard this patch.
src/Gitter/GitterEndpoints.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.gitter.im/docs/rest-api
19 19
  */
20
-class GitterEndpoints extends EndpointMap{
20
+class GitterEndpoints extends EndpointMap {
21 21
 
22 22
 	protected $me = [
23 23
 		'path'          => '/user/me',
Please login to merge, or discard this patch.
src/SoundCloud/SoundCloudEndpoints.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,12 +67,12 @@
 block discarded – undo
67 67
  *
68 68
  *
69 69
  */
70
-class SoundCloudEndpoints extends EndpointMap{
70
+class SoundCloudEndpoints extends EndpointMap {
71 71
 
72 72
 	/**
73 73
 	 * @link
74 74
 	 */
75
-	protected $me   = [
75
+	protected $me = [
76 76
 		'path'          => '/me',
77 77
 		'method'        => 'GET',
78 78
 		'query'         => [],
Please login to merge, or discard this patch.
src/SoundCloud/SoundCloud.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
  * @method \Psr\Http\Message\ResponseInterface me()
22 22
  * @method \Psr\Http\Message\ResponseInterface user(string $id)
23 23
  */
24
-class SoundCloud extends OAuth2Provider implements TokenExpires{
24
+class SoundCloud extends OAuth2Provider implements TokenExpires {
25 25
 
26 26
 	public const SCOPE_NONEXPIRING = 'non-expiring';
27 27
 #	public const SCOPE_EMAIL       = 'email'; // ???
Please login to merge, or discard this patch.