Passed
Branch main (d68b9c)
by smiley
09:54
created
src/Instagram/InstagramEndpoints.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://www.instagram.com/developer/endpoints/
19 19
  */
20
-class InstagramEndpoints extends EndpointMap{
20
+class InstagramEndpoints extends EndpointMap {
21 21
 
22 22
 	/**
23 23
 	 * @link
Please login to merge, or discard this patch.
src/Instagram/Instagram.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
  * @method \Psr\Http\Message\ResponseInterface tags(string $tagname)
44 44
  * @method \Psr\Http\Message\ResponseInterface tagsRecentMedia(string $tagname, array $params = ['max_tag_id', 'min_tag_id', 'count'])
45 45
  */
46
-class Instagram extends OAuth2Provider implements CSRFToken{
46
+class Instagram extends OAuth2Provider implements CSRFToken {
47 47
 
48 48
 	public const SCOPE_BASIC          = 'basic';
49 49
 	public const SCOPE_COMMENTS       = 'comments';
Please login to merge, or discard this patch.
src/GitHub/GitHub.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 getUser(string $username)
22 22
  * @method \Psr\Http\Message\ResponseInterface me()
23 23
  */
24
-class GitHub extends OAuth2Provider implements CSRFToken{
24
+class GitHub extends OAuth2Provider implements CSRFToken {
25 25
 
26 26
 	const SCOPE_USER             = 'user';
27 27
 	const SCOPE_USER_EMAIL       = 'user:email';
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/Twitter/TwitterCC.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
  * @method \Psr\Http\Message\ResponseInterface usersSuggestionsSlugMembers(string $slug, array $params = ['lang'])
133 133
  * @method \Psr\Http\Message\ResponseInterface verifyCredentials(array $params = ['include_entities', 'skip_status'])
134 134
  */
135
-class TwitterCC extends OAuth2Provider implements ClientCredentials{
135
+class TwitterCC extends OAuth2Provider implements ClientCredentials {
136 136
 
137 137
 	protected const AUTH_ERRMSG = 'TwitterCC only supports Client Credentials Grant, use the Twitter OAuth1 class for authentication instead.';
138 138
 
Please login to merge, or discard this patch.
src/Microsoft/MicrosoftGraph.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
  * @method \Psr\Http\Message\ResponseInterface me()
19 19
  */
20
-class MicrosoftGraph extends AzureActiveDirectory{
20
+class MicrosoftGraph extends AzureActiveDirectory {
21 21
 
22 22
 	public const SCOPE_USER_READ = 'User.Read';
23 23
 	public const SCOPE_USER_READBASIC_ALL = 'User.ReadBasic.All';
Please login to merge, or discard this patch.
src/functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,22 +14,22 @@
 block discarded – undo
14 14
 
15 15
 use function function_exists, hash, realpath, str_replace, strlen, substr;
16 16
 
17
-if(!function_exists(__NAMESPACE__.'\\getProviders')){
17
+if (!function_exists(__NAMESPACE__.'\\getProviders')) {
18 18
 
19 19
 	function getProviders():array{
20 20
 		$providers = [];
21 21
 
22 22
 		/** @var \SplFileInfo $e */
23
-		foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__, FilesystemIterator::SKIP_DOTS)) as $e){
23
+		foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__, FilesystemIterator::SKIP_DOTS)) as $e) {
24 24
 
25
-			if($e->getExtension() !== 'php' || realpath($e->getPath()) === __DIR__){
25
+			if ($e->getExtension() !== 'php' || realpath($e->getPath()) === __DIR__) {
26 26
 				continue;
27 27
 			}
28 28
 
29 29
 			$class = __NAMESPACE__.str_replace('/', '\\', substr($e->getPathname(), strlen(__DIR__), -4));
30 30
 			$r     = new ReflectionClass($class);
31 31
 
32
-			if(!$r->implementsInterface(OAuthInterface::class) || $r->isAbstract()){
32
+			if (!$r->implementsInterface(OAuthInterface::class) || $r->isAbstract()) {
33 33
 				continue;
34 34
 			}
35 35
 
Please login to merge, or discard this patch.
src/GuildWars2/GuildWars2.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
  * @method \Psr\Http\Message\ResponseInterface wvwUpgrades(array $params = ['lang'])
233 233
  * @method \Psr\Http\Message\ResponseInterface wvwUpgradesId(string $id, array $params = ['lang'])
234 234
  */
235
-class GuildWars2 extends OAuth2Provider{
235
+class GuildWars2 extends OAuth2Provider {
236 236
 
237 237
 	public const SCOPE_ACCOUNT     = 'account';
238 238
 	public const SCOPE_INVENTORIES = 'inventories';
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 */
263 263
 	public function storeGW2Token(string $access_token):AccessToken{
264 264
 
265
-		if(!preg_match('/^[a-f\d\-]{72}$/i', $access_token)){
265
+		if (!preg_match('/^[a-f\d\-]{72}$/i', $access_token)) {
266 266
 			throw new ProviderException('invalid token');
267 267
 		}
268 268
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
 		$tokeninfo = get_json($this->http->sendRequest($request));
274 274
 
275
-		if(isset($tokeninfo->id) && \strpos($access_token, $tokeninfo->id) === 0){
275
+		if (isset($tokeninfo->id) && \strpos($access_token, $tokeninfo->id) === 0) {
276 276
 
277 277
 			$token = new AccessToken([
278 278
 				'provider'     => $this->serviceName,
Please login to merge, or discard this patch.
src/NPR/NPROne.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@
 block discarded – undo
60 60
 	public function sendRequest(RequestInterface $request):ResponseInterface{
61 61
 
62 62
 		// get authorization only if we request the provider API
63
-		if(strpos((string)$request->getUri(), '.api.npr.org/') !== false){ // silly resource subdomains >.<
63
+		if (strpos((string)$request->getUri(), '.api.npr.org/') !== false) { // silly resource subdomains >.<
64 64
 			$token = $this->storage->getAccessToken($this->serviceName);
65 65
 
66 66
 			// attempt to refresh an expired token
67
-			if($this->options->tokenAutoRefresh && ($token->isExpired() || $token->expires === $token::EOL_UNKNOWN)){
67
+			if ($this->options->tokenAutoRefresh && ($token->isExpired() || $token->expires === $token::EOL_UNKNOWN)) {
68 68
 				$token = $this->refreshAccessToken($token); // @codeCoverageIgnore
69 69
 			}
70 70
 
Please login to merge, or discard this patch.