Passed
Push — feature/package_updates_nov_25 ( 118e61...18f334 )
by Johan
04:58 queued 02:11
created
src/Surfnet/StepupGateway/GatewayBundle/Saml/ResponseBuilder.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -86,20 +86,20 @@
 block discarded – undo
86 86
     private function isValidResponseStatus(string $status): bool
87 87
     {
88 88
         return in_array($status, [
89
-            Constants::STATUS_SUCCESS,            // weeee!
90
-            Constants::STATUS_REQUESTER,          // Something is wrong with the AuthnRequest
91
-            Constants::STATUS_RESPONDER,          // Something went wrong with the Response
92
-            Constants::STATUS_VERSION_MISMATCH,   // The version of the request message was incorrect
89
+            Constants::STATUS_SUCCESS, // weeee!
90
+            Constants::STATUS_REQUESTER, // Something is wrong with the AuthnRequest
91
+            Constants::STATUS_RESPONDER, // Something went wrong with the Response
92
+            Constants::STATUS_VERSION_MISMATCH, // The version of the request message was incorrect
93 93
         ]);
94 94
     }
95 95
 
96 96
     private function isValidResponseSubStatus($subStatus): bool
97 97
     {
98 98
         return in_array($subStatus, [
99
-            Constants::STATUS_AUTHN_FAILED,               // failed authentication
99
+            Constants::STATUS_AUTHN_FAILED, // failed authentication
100 100
             Constants::STATUS_INVALID_ATTR,
101 101
             Constants::STATUS_INVALID_NAMEID_POLICY,
102
-            Constants::STATUS_NO_AUTHN_CONTEXT,           // insufficient Loa or Loa cannot be met
102
+            Constants::STATUS_NO_AUTHN_CONTEXT, // insufficient Loa or Loa cannot be met
103 103
             Constants::STATUS_NO_AVAILABLE_IDP,
104 104
             Constants::STATUS_NO_PASSIVE,
105 105
             Constants::STATUS_NO_SUPPORTED_IDP,
Please login to merge, or discard this patch.
src/Surfnet/StepupGateway/GatewayBundle/Controller/GatewayController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@
 block discarded – undo
236 236
     public function render($view, array $parameters = [], ?Response $response = null): Response
237 237
     {
238 238
         return parent::render(
239
-            '@default/gateway/'.$view.'.html.twig',
239
+            '@default/gateway/' . $view . '.html.twig',
240 240
             $parameters,
241 241
             $response,
242 242
         );
Please login to merge, or discard this patch.
src/Surfnet/StepupGateway/GatewayBundle/Controller/ExceptionController.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
     /**
44 44
      * @return array View parameters 'title' and 'description'
45 45
      */
46
-    protected function getPageTitleAndDescription(\Exception|Throwable $exception): array
46
+    protected function getPageTitleAndDescription(\Exception | Throwable $exception): array
47 47
     {
48 48
         $translator = $this->getTranslator();
49 49
 
Please login to merge, or discard this patch.
Surfnet/StepupGateway/GatewayBundle/Controller/SecondFactorController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     public function selectSecondFactorForVerification(
79 79
         string $authenticationMode,
80 80
         Request $request,
81
-    ): Response|RedirectResponse {
81
+    ): Response | RedirectResponse {
82 82
         $this->supportsAuthenticationMode($authenticationMode);
83 83
         $context = $this->getResponseContext($authenticationMode);
84 84
         $originalRequestId = $context->getInResponseTo();
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     public function chooseSecondFactor(
193 193
         Request $request,
194 194
         string $authenticationMode,
195
-    ): Response|RedirectResponse|array {
195
+    ): Response | RedirectResponse | array {
196 196
         $this->supportsAuthenticationMode($authenticationMode);
197 197
         $context = $this->getResponseContext($authenticationMode);
198 198
         $originalRequestId = $context->getInResponseTo();
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
     )]
480 480
     public function verifySmsSecondFactor(
481 481
         Request $request,
482
-    ): Response|RedirectResponse {
482
+    ): Response | RedirectResponse {
483 483
         if (!$request->get('authenticationMode', false)) {
484 484
             throw new RuntimeException('Unable to determine the authentication mode in the SMS verification action');
485 485
         }
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
     )]
560 560
     public function verifySmsSecondFactorChallenge(
561 561
         Request $request,
562
-    ): Response|array {
562
+    ): Response | array {
563 563
         if (!$request->get('authenticationMode', false)) {
564 564
             throw new RuntimeException('Unable to determine the authentication mode in the SMS challenge action');
565 565
         }
Please login to merge, or discard this patch.
StepupGateway/SecondFactorOnlyBundle/Service/Gateway/ResponseValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
             if ($subjectNameIdFromResponse !== $secondFactor->getSecondFactorIdentifier()) {
70 70
                 throw new ReceivedInvalidSubjectNameIdException(
71 71
                     sprintf(
72
-                        'The nameID received from the GSSP (%s) did not match the selected second factor (%s). This '.
72
+                        'The nameID received from the GSSP (%s) did not match the selected second factor (%s). This ' .
73 73
                         'might be an indication someone is tampering with a GSSP. The authentication was started by %s',
74 74
                         $subjectNameIdFromResponse,
75 75
                         $secondFactor->getSecondFactorIdentifier(),
Please login to merge, or discard this patch.
StepupGateway/SecondFactorOnlyBundle/Service/Gateway/RespondService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
         }
103 103
 
104 104
         $secondFactor = $this->secondFactorService->findByUuid($selectedSecondFactorUuid);
105
-        $loaLevel =  $this->secondFactorService->getLoaLevel($secondFactor);
105
+        $loaLevel = $this->secondFactorService->getLoaLevel($secondFactor);
106 106
         $this->responseValidator->validate($request, $secondFactor, $responseContext->getIdentityNameId());
107 107
 
108 108
         $authnContextClassRef = $this->loaAliasLookupService->findAliasByLoa($loaLevel);
Please login to merge, or discard this patch.
src/Surfnet/StepupGateway/GatewayBundle/Saml/Proxy/ProxyStateHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 
205 205
     public function isSecondFactorFallback(): bool
206 206
     {
207
-        return (bool)$this->get('selected_second_factor_fallback');
207
+        return (bool) $this->get('selected_second_factor_fallback');
208 208
     }
209 209
 
210 210
     public function setGsspUserAttributes(string $subject, string $institution): ProxyStateHandler
@@ -217,12 +217,12 @@  discard block
 block discarded – undo
217 217
 
218 218
     public function getGsspUserAttributeSubject(): string
219 219
     {
220
-        return (string)$this->get('user_attribute_subject');
220
+        return (string) $this->get('user_attribute_subject');
221 221
     }
222 222
 
223 223
     public function getGsspUserAttributeInstitution(): string
224 224
     {
225
-        return (string)$this->get('user_attribute_institution');
225
+        return (string) $this->get('user_attribute_institution');
226 226
     }
227 227
 
228 228
     public function setVerifiedBySsoOn2faCookie(bool $isVerifiedByCookie): ProxyStateHandler
Please login to merge, or discard this patch.
SecondFactorOnlyBundle/Service/Gateway/GsspFallbackService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
             $this->stateHandler->getGsspUserAttributeSubject(),
163 163
             $this->stateHandler->getGsspUserAttributeInstitution(),
164 164
             $this->config->getGssp(),
165
-            (string)$this->stateHandler->getPreferredLocale()
165
+            (string) $this->stateHandler->getPreferredLocale()
166 166
         );
167 167
     }
168 168
 }
Please login to merge, or discard this patch.
Surfnet/StepupGateway/GatewayBundle/Monolog/Logger/AuthenticationLogger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
             'institution'           => $secondFactor->getInstitution(),
92 92
             'authentication_result' => $context->isSecondFactorVerified() ? 'OK' : 'FAILED',
93 93
             'resulting_loa'         => (string) $loa,
94
-            'sso' => $context->isVerifiedBySsoOn2faCookie() ? 'YES': 'NO',
94
+            'sso' => $context->isVerifiedBySsoOn2faCookie() ? 'YES' : 'NO',
95 95
         ];
96 96
 
97 97
         if ($context->isVerifiedBySsoOn2faCookie()) {
Please login to merge, or discard this patch.