Passed
Push — master ( 78040a...1bbc9c )
by smiley
01:26
created
src/GitLab/GitLabV4Endpoints.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://docs.gitlab.com/ee/api/README.html
19 19
  */
20
-class GitLabV4Endpoints extends EndpointMap{
20
+class GitLabV4Endpoints extends EndpointMap {
21 21
 
22 22
 	protected $API_BASE = '/v4';
23 23
 
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/Bitbucket/BitbucketEndpoints.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 BitbucketEndpoints extends EndpointMap{
19
+class BitbucketEndpoints extends EndpointMap {
20 20
 
21 21
 	protected $API_BASE = '/2.0';
22 22
 
Please login to merge, or discard this patch.
src/PayPal/PayPalEndpoints.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.paypal.com/docs/api/identity/v1/
19 19
  */
20
-class PayPalEndpoints extends EndpointMap{
20
+class PayPalEndpoints extends EndpointMap {
21 21
 
22 22
 	protected $me = [
23 23
 		'path'          => '/v1/identity/oauth2/userinfo',
Please login to merge, or discard this patch.
src/PayPal/PayPal.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,21 +44,21 @@  discard block
 block discarded – undo
44 44
 	protected function parseTokenResponse(ResponseInterface $response):AccessToken{
45 45
 		$data = \json_decode(Psr7\decompress_content($response), true);
46 46
 
47
-		if(!\is_array($data)){
47
+		if (!\is_array($data)) {
48 48
 			throw new ProviderException('unable to parse token response');
49 49
 		}
50 50
 
51
-		foreach(['error_description', 'error'] as $field){
52
-			if(isset($data[$field])){
51
+		foreach (['error_description', 'error'] as $field) {
52
+			if (isset($data[$field])) {
53 53
 				throw new ProviderException('error retrieving access token: "'.$data[$field].'"');
54 54
 			}
55 55
 		}
56 56
 
57 57
 		// @codeCoverageIgnoreStart
58
-		if(isset($data['name'], $data['message'])){
58
+		if (isset($data['name'], $data['message'])) {
59 59
 			$msg = \sprintf('error retrieving access token: "%s" [%s]', $data['message'], $data['name']);
60 60
 
61
-			if(isset($data['links']) && \is_array($data['links'])){
61
+			if (isset($data['links']) && \is_array($data['links'])) {
62 62
 				$msg .= "\n".\implode("\n", \array_column($data['links'], 'href'));
63 63
 			}
64 64
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 		}
67 67
 		// @codeCoverageIgnoreEnd
68 68
 
69
-		if(!isset($data['access_token'])){
69
+		if (!isset($data['access_token'])) {
70 70
 			throw new ProviderException('token missing');
71 71
 		}
72 72
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	 */
93 93
 	public function getAccessToken(string $code, string $state = null):AccessToken{
94 94
 
95
-		if($this instanceof CSRFToken){
95
+		if ($this instanceof CSRFToken) {
96 96
 			$this->checkState($state);
97 97
 		}
98 98
 
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/Microsoft/MicrosoftGraphEndpoints.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://docs.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0
19 19
  */
20
-class MicrosoftGraphEndpoints extends EndpointMap{
20
+class MicrosoftGraphEndpoints extends EndpointMap {
21 21
 
22 22
 	protected $API_BASE = '/v1.0';
23 23
 
Please login to merge, or discard this patch.
src/PayPal/PayPalSandbox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 /**
16 16
  * @method \Psr\Http\Message\ResponseInterface me(array $params = ['schema'])
17 17
  */
18
-class PayPalSandbox extends PayPal{
18
+class PayPalSandbox extends PayPal {
19 19
 
20 20
 	protected $apiURL         = 'https://api.sandbox.paypal.com';
21 21
 	protected $accessTokenURL = 'https://api.sandbox.paypal.com/v1/oauth2/token';
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
@@ -12,22 +12,22 @@
 block discarded – undo
12 12
 use chillerlan\OAuth\Core\OAuthInterface;
13 13
 use FilesystemIterator, RecursiveDirectoryIterator, RecursiveIteratorIterator, ReflectionClass;
14 14
 
15
-if(!\function_exists(__NAMESPACE__.'\\getProviders')){
15
+if (!\function_exists(__NAMESPACE__.'\\getProviders')) {
16 16
 
17 17
 	function getProviders():array{
18 18
 		$providers = [];
19 19
 
20 20
 		/** @var \SplFileInfo $e */
21
-		foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__, FilesystemIterator::SKIP_DOTS)) as $e){
21
+		foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__, FilesystemIterator::SKIP_DOTS)) as $e) {
22 22
 
23
-			if($e->getExtension() !== 'php' || \realpath($e->getPath()) === __DIR__){
23
+			if ($e->getExtension() !== 'php' || \realpath($e->getPath()) === __DIR__) {
24 24
 				continue;
25 25
 			}
26 26
 
27 27
 			$class = __NAMESPACE__.\str_replace('/', '\\', \substr($e->getPathname(), \strlen(__DIR__), -4));
28 28
 			$r     = new ReflectionClass($class);
29 29
 
30
-			if(!$r->implementsInterface(OAuthInterface::class) || $r->isAbstract()){
30
+			if (!$r->implementsInterface(OAuthInterface::class) || $r->isAbstract()) {
31 31
 				continue;
32 32
 			}
33 33
 
Please login to merge, or discard this patch.