Failed Conditions
Push — master ( 516359...a8b39a )
by Florent
04:00
created
ClientAssertionJwtTokenEndpointAuthMethodEncryptionSupportSource.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
@@ -46,19 +46,19 @@  discard block
 block discarded – undo
46 46
         parent::continueConfiguration($node);
47 47
         $node
48 48
             ->validate()
49
-                ->ifTrue(function ($config) {
49
+                ->ifTrue(function($config) {
50 50
                     return true === $config['enabled'] && empty($config['key_encryption_algorithms']);
51 51
                 })
52 52
                 ->thenInvalid('At least one key encryption algorithm must be set.')
53 53
             ->end()
54 54
             ->validate()
55
-                ->ifTrue(function ($config) {
55
+                ->ifTrue(function($config) {
56 56
                     return true === $config['enabled'] && empty($config['content_encryption_algorithms']);
57 57
                 })
58 58
                 ->thenInvalid('At least one content encryption algorithm must be set.')
59 59
             ->end()
60 60
             ->validate()
61
-                ->ifTrue(function ($config) {
61
+                ->ifTrue(function($config) {
62 62
                     return true === $config['enabled'] && empty($config['key_set']);
63 63
                 })
64 64
                 ->thenInvalid('The KeySet must be set.')
Please login to merge, or discard this patch.
src/Bundle/Server/Model/RefreshTokenRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     /**
87 87
      * {@inheritdoc}
88 88
      */
89
-    public function create(ResourceOwnerId $resourceOwnerId, ClientId $clientId, DataBag $parameters, DataBag $metadatas, array $scopes, ?ResourceServerId $resourceServerId, ?\DateTimeImmutable $expiresAt): RefreshToken
89
+    public function create(ResourceOwnerId $resourceOwnerId, ClientId $clientId, DataBag $parameters, DataBag $metadatas, array $scopes, ? ResourceServerId $resourceServerId, ? \DateTimeImmutable $expiresAt) : RefreshToken
90 90
     {
91 91
         if (null === $expiresAt) {
92 92
             $expiresAt = new \DateTimeImmutable(sprintf('now +%u seconds', $this->lifetime));
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      *
156 156
      * @return RefreshToken|null
157 157
      */
158
-    private function getFromCache(RefreshTokenId $refreshTokenId): ?RefreshToken
158
+    private function getFromCache(RefreshTokenId $refreshTokenId): ? RefreshToken
159 159
     {
160 160
         $itemKey = sprintf('oauth2-refresh_token-%s', $refreshTokenId->getValue());
161 161
         if (null !== $this->cache) {
Please login to merge, or discard this patch.
src/Bundle/Server/Model/ClientRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     /**
53 53
      * {@inheritdoc}
54 54
      */
55
-    public function find(ClientId $clientId): ?Client
55
+    public function find(ClientId $clientId): ? Client
56 56
     {
57 57
         $client = $this->getFromCache($clientId);
58 58
         if (null === $client) {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      *
98 98
      * @return Client|null
99 99
      */
100
-    private function getFromCache(ClientId $clientId): ?Client
100
+    private function getFromCache(ClientId $clientId): ? Client
101 101
     {
102 102
         $itemKey = sprintf('oauth2-client-%s', $clientId->getValue());
103 103
         if (null !== $this->cache) {
Please login to merge, or discard this patch.
src/Bundle/Server/Model/InitialAccessTokenRepository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     /**
55 55
      * {@inheritdoc}
56 56
      */
57
-    public function create(?UserAccountId $userAccountId, ?\DateTimeImmutable $expiresAt): InitialAccessToken
57
+    public function create(? UserAccountId $userAccountId, ? \DateTimeImmutable $expiresAt) : InitialAccessToken
58 58
     {
59 59
         $initialAccessTokeId = InitialAccessTokenId::create(Uuid::uuid4()->toString());
60 60
         $initialAccessToken = InitialAccessToken::createEmpty();
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     /**
67 67
      * {@inheritdoc}
68 68
      */
69
-    public function find(InitialAccessTokenId $initialAccessTokenId): ?InitialAccessToken
69
+    public function find(InitialAccessTokenId $initialAccessTokenId): ? InitialAccessToken
70 70
     {
71 71
         $initialAccessToken = $this->getFromCache($initialAccessTokenId);
72 72
         if (null === $initialAccessToken) {
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      *
112 112
      * @return InitialAccessToken|null
113 113
      */
114
-    private function getFromCache(InitialAccessTokenId $initialAccessTokenId): ?InitialAccessToken
114
+    private function getFromCache(InitialAccessTokenId $initialAccessTokenId): ? InitialAccessToken
115 115
     {
116 116
         $itemKey = sprintf('oauth2-initial_access_token-%s', $initialAccessTokenId->getValue());
117 117
         if (null !== $this->cache) {
Please login to merge, or discard this patch.
src/Bundle/Server/Model/PreConfiguredAuthorizationRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     /**
57 57
      * {@inheritdoc}
58 58
      */
59
-    public function create(UserAccountId $userAccountId, ClientId $clientId, array $scopes, ?ResourceServerId $resourceServerId): PreConfiguredAuthorization
59
+    public function create(UserAccountId $userAccountId, ClientId $clientId, array $scopes, ? ResourceServerId $resourceServerId) : PreConfiguredAuthorization
60 60
     {
61 61
         $hash = $this->calculateHash($userAccountId, $clientId, $scopes, $resourceServerId);
62 62
         $preConfiguredAuthorization = PreConfiguredAuthorization::createEmpty();
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     /**
69 69
      * {@inheritdoc}
70 70
      */
71
-    public function find(UserAccountId $userAccountId, ClientId $clientId, array $scopes, ?ResourceServerId $resourceServerId): ?PreConfiguredAuthorization
71
+    public function find(UserAccountId $userAccountId, ClientId $clientId, array $scopes, ? ResourceServerId $resourceServerId) : ? PreConfiguredAuthorization
72 72
     {
73 73
         $hash = $this->calculateHash($userAccountId, $clientId, $scopes, $resourceServerId);
74 74
         $preConfiguredAuthorization = $this->getFromCache($hash);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      *
115 115
      * @return PreConfiguredAuthorization|null
116 116
      */
117
-    private function getFromCache(PreConfiguredAuthorizationId $preConfiguredAuthorizationId): ?PreConfiguredAuthorization
117
+    private function getFromCache(PreConfiguredAuthorizationId $preConfiguredAuthorizationId): ? PreConfiguredAuthorization
118 118
     {
119 119
         $itemKey = sprintf('oauth2-pre_configured_authorization-%s', $preConfiguredAuthorizationId->getValue());
120 120
         if (null !== $this->cache) {
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      *
150 150
      * @return PreConfiguredAuthorizationId
151 151
      */
152
-    private function calculateHash(ResourceOwnerId $resourceOwnerId, ClientId $clientId, array $scope, ?ResourceServerId $resourceServerId): PreConfiguredAuthorizationId
152
+    private function calculateHash(ResourceOwnerId $resourceOwnerId, ClientId $clientId, array $scope, ? ResourceServerId $resourceServerId) : PreConfiguredAuthorizationId
153 153
     {
154 154
         return PreConfiguredAuthorizationId::create(hash(
155 155
             'sha512',
Please login to merge, or discard this patch.
src/Bundle/Server/Model/AuthCodeRepository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     /**
79 79
      * {@inheritdoc}
80 80
      */
81
-    public function create(ClientId $clientId, UserAccountId $userAccountId, array $queryParameters, string $redirectUri, DataBag $parameters, DataBag $metadatas, array $scopes, bool $withRefreshToken, ?ResourceServerId $resourceServerId, ?\DateTimeImmutable $expiresAt): AuthCode
81
+    public function create(ClientId $clientId, UserAccountId $userAccountId, array $queryParameters, string $redirectUri, DataBag $parameters, DataBag $metadatas, array $scopes, bool $withRefreshToken, ? ResourceServerId $resourceServerId, ? \DateTimeImmutable $expiresAt) : AuthCode
82 82
     {
83 83
         if (null === $expiresAt) {
84 84
             $expiresAt = new \DateTimeImmutable(sprintf('now +%u seconds', $this->lifetime));
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     /**
106 106
      * {@inheritdoc}
107 107
      */
108
-    public function find(AuthCodeId $authCodeId): ?AuthCode
108
+    public function find(AuthCodeId $authCodeId): ? AuthCode
109 109
     {
110 110
         $authCode = $this->getFromCache($authCodeId);
111 111
         if (null === $authCode) {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      *
151 151
      * @return AuthCode|null
152 152
      */
153
-    private function getFromCache(AuthCodeId $authCodeId): ?AuthCode
153
+    private function getFromCache(AuthCodeId $authCodeId): ? AuthCode
154 154
     {
155 155
         $itemKey = sprintf('oauth2-auth_code-%s', $authCodeId->getValue());
156 156
         if (null !== $this->cache) {
Please login to merge, or discard this patch.
ResourceOwnerPasswordCredentialsGrantTypePlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         }
68 68
 
69 69
         $parameters = [
70
-            'oauth2_server.resource_owner_password_credentials_grant_type.user_account_manager' => ['type' => 'alias',     'path' => '[user_account_manager]'],
70
+            'oauth2_server.resource_owner_password_credentials_grant_type.user_account_manager' => ['type' => 'alias', 'path' => '[user_account_manager]'],
71 71
         ];
72 72
 
73 73
         $this->loadParameters($parameters, $pluginConfiguration, $container);
Please login to merge, or discard this patch.
src/Bundle/Server/Plugin/JWTBearerPlugin/JWTBearerPlugin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
         $accessor = PropertyAccess::createPropertyAccessor();
68 68
         if (true === $accessor->getValue($pluginConfiguration, '[encryption][enabled]')) {
69
-            $parameters['oauth2_server.jwt_bearer_grant_type.encryption.key_set'] = ['type' => 'alias',     'path' => '[encryption][key_set]'];
69
+            $parameters['oauth2_server.jwt_bearer_grant_type.encryption.key_set'] = ['type' => 'alias', 'path' => '[encryption][key_set]'];
70 70
             $parameters['oauth2_server.jwt_bearer_grant_type.encryption.required'] = ['type' => 'parameter', 'path' => '[encryption][required]'];
71 71
         }
72 72
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
      */
208 208
     private function isClientAssertionEncryptionParameterInvalid($parameter)
209 209
     {
210
-        return function ($data) use ($parameter) {
210
+        return function($data) use ($parameter) {
211 211
             if (false === $data['encryption']['enabled']) {
212 212
                 return false;
213 213
             }
Please login to merge, or discard this patch.
src/Bundle/Server/Plugin/ClientManagerPlugin/ClientManagerPlugin.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                 $parameters['oauth2_server.token_endpoint_auth_method.client_assertion_jwt.encryption.key_encryption_algorithms'] = ['type' => 'parameter', 'path' => '[token_endpoint_auth_methods][client_assertion_jwt][encryption][key_encryption_algorithms]'];
111 111
                 $parameters['oauth2_server.token_endpoint_auth_method.client_assertion_jwt.encryption.content_encryption_algorithms'] = ['type' => 'parameter', 'path' => '[token_endpoint_auth_methods][client_assertion_jwt][encryption][content_encryption_algorithms]'];
112 112
                 $parameters['oauth2_server.token_endpoint_auth_method.client_assertion_jwt.encryption.required'] = ['type' => 'parameter', 'path' => '[token_endpoint_auth_methods][client_assertion_jwt][encryption][required]'];
113
-                $parameters['oauth2_server.token_endpoint_auth_method.client_assertion_jwt.encryption.key_set'] = ['type' => 'alias',     'path' => '[token_endpoint_auth_methods][client_assertion_jwt][encryption][key_set]'];
113
+                $parameters['oauth2_server.token_endpoint_auth_method.client_assertion_jwt.encryption.key_set'] = ['type' => 'alias', 'path' => '[token_endpoint_auth_methods][client_assertion_jwt][encryption][key_set]'];
114 114
             }
115 115
         }
116 116
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
                     ->info('The Client class.')
157 157
                     ->isRequired()
158 158
                     ->validate()
159
-                    ->ifTrue(function ($value) {
159
+                    ->ifTrue(function($value) {
160 160
                         return !class_exists($value);
161 161
                     })
162 162
                     ->thenInvalid('The class does not exist.')
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
      */
427 427
     private function areClientAssertionSignatureAlgorithmsInvalid()
428 428
     {
429
-        return function ($data) {
429
+        return function($data) {
430 430
             if (false === $data['enabled']) {
431 431
                 return false;
432 432
             }
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
      */
443 443
     private function isClientAssertionEncryptionParameterInvalid($parameter)
444 444
     {
445
-        return function ($data) use ($parameter) {
445
+        return function($data) use ($parameter) {
446 446
             if (false === $data['encryption']['enabled']) {
447 447
                 return false;
448 448
             }
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
      */
457 457
     private function isClientSecretBasicRealmInvalid()
458 458
     {
459
-        return function ($data) {
459
+        return function($data) {
460 460
             if (false === $data['enabled']) {
461 461
                 return false;
462 462
             }
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
      */
471 471
     private function isRegistrationPathValid()
472 472
     {
473
-        return function ($data) {
473
+        return function($data) {
474 474
             return true === $data['enabled'] && empty($data['registration_path']);
475 475
         };
476 476
     }
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
      */
481 481
     private function isConfigurationPathValid()
482 482
     {
483
-        return function ($data) {
483
+        return function($data) {
484 484
             return true === $data['enabled'] && empty($data['configuration_path']);
485 485
         };
486 486
     }
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
      */
491 491
     private function isInitialAccessTokenClassValid()
492 492
     {
493
-        return function ($data) {
493
+        return function($data) {
494 494
             return true === $data['enabled'] && (empty($data['class']) || !class_exists($data['class']));
495 495
         };
496 496
     }
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
      */
501 501
     private function isInitialAccessTokenManagerValid()
502 502
     {
503
-        return function ($data) {
503
+        return function($data) {
504 504
             return true === $data['enabled'] && empty($data['class']);
505 505
         };
506 506
     }
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
      */
511 511
     private function isSoftwareStatementKeySetValid()
512 512
     {
513
-        return function ($data) {
513
+        return function($data) {
514 514
             return true === $data['enabled'] && empty($data['key_set']);
515 515
         };
516 516
     }
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
      */
521 521
     private function isSoftwareStatementAlgorithmValid()
522 522
     {
523
-        return function ($data) {
523
+        return function($data) {
524 524
             return true === $data['enabled'] && empty($data['signature_algorithm']);
525 525
         };
526 526
     }
Please login to merge, or discard this patch.