Passed
Push — main ( 129f19...5ed128 )
by smiley
31:18
created
src/NPR/NPROne.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -56,15 +56,15 @@  discard block
 block discarded – undo
56 56
 	protected function getRequestTarget(string $uri):string{
57 57
 		$parsedURL = parse_url($uri);
58 58
 
59
-		if(!isset($parsedURL['path'])){
59
+		if (!isset($parsedURL['path'])) {
60 60
 			throw new ProviderException('invalid path'); // @codeCoverageIgnore
61 61
 		}
62 62
 
63 63
 		// for some reason we were given a host name
64
-		if(isset($parsedURL['host'])){
64
+		if (isset($parsedURL['host'])) {
65 65
 
66 66
 			// back out if it doesn't match
67
-			if(strpos($parsedURL['host'], '.api.npr.org') === false){
67
+			if (strpos($parsedURL['host'], '.api.npr.org') === false) {
68 68
 				throw new ProviderException('given host does not match provider host'); // @codeCoverageIgnore
69 69
 			}
70 70
 
@@ -82,14 +82,14 @@  discard block
 block discarded – undo
82 82
 	public function sendRequest(RequestInterface $request):ResponseInterface{
83 83
 
84 84
 		// get authorization only if we request the provider API
85
-		if(strpos((string)$request->getUri(), '.api.npr.org') !== false){
85
+		if (strpos((string)$request->getUri(), '.api.npr.org') !== false) {
86 86
 			$token = $this->storage->getAccessToken($this->serviceName);
87 87
 
88 88
 			// attempt to refresh an expired token
89
-			if(
89
+			if (
90 90
 				$this->options->tokenAutoRefresh
91 91
 				&& ($token->isExpired() || $token->expires === $token::EOL_UNKNOWN)
92
-			){
92
+			) {
93 93
 				$token = $this->refreshAccessToken($token); // @codeCoverageIgnore
94 94
 			}
95 95
 
Please login to merge, or discard this patch.
src/Twitch/Twitch.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	protected array $authHeaders       = ['Accept' => 'application/vnd.twitchtv.v5+json'];
116 116
 	protected array $apiHeaders        = ['Accept' => 'application/vnd.twitchtv.v5+json'];
117 117
 
118
-	protected array $defaultScopes     =  [
118
+	protected array $defaultScopes     = [
119 119
 		self::SCOPE_USER_READ_EMAIL,
120 120
 	];
121 121
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 			'grant_type'    => 'client_credentials',
134 134
 		];
135 135
 
136
-		if($scopes !== null){
136
+		if ($scopes !== null) {
137 137
 			$params['scope'] = implode($this->scopesDelimiter, $scopes);
138 138
 		}
139 139
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 			->withBody($this->streamFactory->createStream(http_build_query($params, '', '&', PHP_QUERY_RFC1738)))
144 144
 		;
145 145
 
146
-		foreach($this->authHeaders as $header => $value){
146
+		foreach ($this->authHeaders as $header => $value) {
147 147
 			$request = $request->withAddedHeader($header, $value);
148 148
 		}
149 149
 
Please login to merge, or discard this patch.
src/Twitch/TwitchEndpoints.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 use chillerlan\OAuth\MagicAPI\EndpointMap;
13 13
 
14
-class TwitchEndpoints extends EndpointMap{
14
+class TwitchEndpoints extends EndpointMap {
15 15
 
16 16
 	protected string $API_BASE = '/helix';
17 17
 
Please login to merge, or discard this patch.
src/Mastodon/Mastodon.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	public function setInstance(string $instance):Mastodon{
120 120
 		$instance = parse_url($instance);
121 121
 
122
-		if(!isset($instance['scheme']) || !isset($instance['host'])){
122
+		if (!isset($instance['scheme']) || !isset($instance['host'])) {
123 123
 			throw new OAuthException('invalid instance URL');
124 124
 		}
125 125
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 			->withHeader('Accept-Encoding', 'identity')
156 156
 			->withBody($this->streamFactory->createStream(http_build_query($body, '', '&', PHP_QUERY_RFC1738)));
157 157
 
158
-		foreach($this->authHeaders as $header => $value){
158
+		foreach ($this->authHeaders as $header => $value) {
159 159
 			$request = $request->withHeader($header, $value);
160 160
 		}
161 161
 
Please login to merge, or discard this patch.
src/Spotify/SpotifyEndpoints.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 use chillerlan\OAuth\MagicAPI\EndpointMap;
13 13
 
14
-class SpotifyEndpoints extends EndpointMap{
14
+class SpotifyEndpoints extends EndpointMap {
15 15
 
16 16
 	protected string $API_BASE = '/v1';
17 17
 
Please login to merge, or discard this patch.
src/Vimeo/Vimeo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
 	protected array $authHeaders                 = ['Accept' => 'application/vnd.vimeo.*+json;version='.self::API_VERSION];
125 125
 	protected array $apiHeaders                  = ['Accept' => 'application/vnd.vimeo.*+json;version='.self::API_VERSION];
126 126
 
127
-	protected array $defaultScopes               =  [
127
+	protected array $defaultScopes               = [
128 128
 		self::SCOPE_PRIVATE,
129 129
 		self::SCOPE_INTERACT,
130 130
 	];
Please login to merge, or discard this patch.
src/OpenCaching/OpenCachingEndpoints.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 use chillerlan\OAuth\MagicAPI\EndpointMap;
13 13
 
14
-class OpenCachingEndpoints extends EndpointMap{
14
+class OpenCachingEndpoints extends EndpointMap {
15 15
 
16 16
 	protected string $API_BASE = '/services';
17 17
 
Please login to merge, or discard this patch.