Passed
Push — feature/symfony6-upgrade ( bb274e...7f0a22 )
by Paul
13:24 queued 06:45
created
src/Surfnet/StepupGateway/GatewayBundle/Service/Gateway/RespondService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
         $response = $this->responseProxy->createProxyResponse(
97 97
             $responseContext->reconstituteAssertion(),
98 98
             $responseContext->getDestination(),
99
-            (string)$grantedLoa
99
+            (string) $grantedLoa
100 100
         );
101 101
 
102 102
         $logger->notice(sprintf(
Please login to merge, or discard this patch.
src/Surfnet/StepupGateway/GatewayBundle/Service/ProxyResponseService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@
 block discarded – undo
160 160
     private function addAuthenticationStatementTo(Assertion $newAssertion, Assertion $assertion)
161 161
     {
162 162
         $newAssertion->setAuthnInstant($assertion->getAuthnInstant());
163
-        $newAssertion->setAuthnContextClassRef((string)$this->intrinsicLoa);
163
+        $newAssertion->setAuthnContextClassRef((string) $this->intrinsicLoa);
164 164
 
165 165
         $authority = $assertion->getAuthenticatingAuthority();
166 166
         $newAssertion->setAuthenticatingAuthority(
Please login to merge, or discard this patch.
src/Surfnet/StepupGateway/GatewayBundle/Saml/AssertionAdapter.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     public function inResponseToMatches($inResponseTo)
37 37
     {
38
-         return $this->getInResponseTo() === $inResponseTo;
38
+            return $this->getInResponseTo() === $inResponseTo;
39 39
     }
40 40
 
41 41
     /**
Please login to merge, or discard this patch.
src/Surfnet/StepupGateway/GatewayBundle/Saml/ResponseBuilder.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -95,20 +95,20 @@
 block discarded – undo
95 95
     private function isValidResponseStatus($status)
96 96
     {
97 97
         return in_array($status, [
98
-            Constants::STATUS_SUCCESS,            // weeee!
99
-            Constants::STATUS_REQUESTER,          // Something is wrong with the AuthnRequest
100
-            Constants::STATUS_RESPONDER,          // Something went wrong with the Response
101
-            Constants::STATUS_VERSION_MISMATCH,   // The version of the request message was incorrect
98
+            Constants::STATUS_SUCCESS, // weeee!
99
+            Constants::STATUS_REQUESTER, // Something is wrong with the AuthnRequest
100
+            Constants::STATUS_RESPONDER, // Something went wrong with the Response
101
+            Constants::STATUS_VERSION_MISMATCH, // The version of the request message was incorrect
102 102
         ]);
103 103
     }
104 104
 
105 105
     private function isValidResponseSubStatus($subStatus)
106 106
     {
107 107
         return in_array($subStatus, [
108
-            Constants::STATUS_AUTHN_FAILED,               // failed authentication
108
+            Constants::STATUS_AUTHN_FAILED, // failed authentication
109 109
             Constants::STATUS_INVALID_ATTR,
110 110
             Constants::STATUS_INVALID_NAMEID_POLICY,
111
-            Constants::STATUS_NO_AUTHN_CONTEXT,           // insufficient Loa or Loa cannot be met
111
+            Constants::STATUS_NO_AUTHN_CONTEXT, // insufficient Loa or Loa cannot be met
112 112
             Constants::STATUS_NO_AVAILABLE_IDP,
113 113
             Constants::STATUS_NO_PASSIVE,
114 114
             Constants::STATUS_NO_SUPPORTED_IDP,
Please login to merge, or discard this patch.
src/Surfnet/StepupGateway/GatewayBundle/Saml/ResponseContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
         $this->samlEntityService      = $samlEntityService;
80 80
         $this->stateHandler           = $stateHandler;
81 81
         $this->logger                 = $logger;
82
-        $this->generationTime         = is_null($now) ? new DateTime('now', new DateTimeZone('UTC')): $now;
82
+        $this->generationTime         = is_null($now) ? new DateTime('now', new DateTimeZone('UTC')) : $now;
83 83
     }
84 84
 
85 85
     /**
Please login to merge, or discard this patch.
src/Surfnet/StepupGateway/GatewayBundle/Form/Type/SendSmsChallengeType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     {
30 30
         $builder->add('send_challenge', SubmitType::class, [
31 31
             'label' => 'gateway.form.gateway_send_sms_challenge.button.send_challenge',
32
-            'attr' => [ 'class' => 'btn btn-primary' ],
32
+            'attr' => ['class' => 'btn btn-primary'],
33 33
         ]);
34 34
     }
35 35
 
Please login to merge, or discard this patch.
Surfnet/StepupGateway/GatewayBundle/Controller/SecondFactorController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -271,7 +271,7 @@
 block discarded – undo
271 271
             $form->addError(
272 272
                 new FormError(
273 273
                     $this->get('translator')
274
-                      ->trans('gateway.form.gateway_choose_second_factor.unknown_second_factor_type')
274
+                        ->trans('gateway.form.gateway_choose_second_factor.unknown_second_factor_type')
275 275
                 )
276 276
             );
277 277
         }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 
248 248
             // Filter the selected second factor from the array collection
249 249
             $secondFactorFiltered = $secondFactors->filter(
250
-                function ($secondFactor) use ($secondFactorType) {
250
+                function($secondFactor) use ($secondFactorType) {
251 251
                     return $secondFactorType === $secondFactor->secondFactorType;
252 252
                 }
253 253
             );
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
         $form = $this->createForm(VerifyYubikeyOtpType::class, $command)->handleRequest($request);
393 393
         $cancelForm = $this->buildCancelAuthenticationForm($authenticationMode)->handleRequest($request);
394 394
 
395
-        if ($form->isSubmitted()  && $form->isValid()) {
395
+        if ($form->isSubmitted() && $form->isValid()) {
396 396
             $result = $this->getStepupService()->verifyYubikeyOtp($command);
397 397
             if ($result->didOtpVerificationFail()) {
398 398
                 $form->addError(
Please login to merge, or discard this patch.
src/Kernel.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function registerBundles(): iterable
34 34
     {
35
-        $contents = require $this->getProjectDir().'/config/bundles.php';
35
+        $contents = require $this->getProjectDir() . '/config/bundles.php';
36 36
         foreach ($contents as $class => $envs) {
37 37
             if ($envs[$this->environment] ?? $envs['all'] ?? false) {
38 38
                 yield new $class();
@@ -47,23 +47,23 @@  discard block
 block discarded – undo
47 47
 
48 48
     protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
49 49
     {
50
-        $container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php'));
50
+        $container->addResource(new FileResource($this->getProjectDir() . '/config/bundles.php'));
51 51
         $container->setParameter('container.dumper.inline_class_loader', \PHP_VERSION_ID < 70400 || $this->debug);
52 52
         $container->setParameter('container.dumper.inline_factories', true);
53
-        $confDir = $this->getProjectDir().'/config';
53
+        $confDir = $this->getProjectDir() . '/config';
54 54
 
55
-        $loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob');
56
-        $loader->load($confDir.'/{packages}/'.$this->environment.'/*'.self::CONFIG_EXTS, 'glob');
57
-        $loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob');
58
-        $loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob');
55
+        $loader->load($confDir . '/{packages}/*' . self::CONFIG_EXTS, 'glob');
56
+        $loader->load($confDir . '/{packages}/' . $this->environment . '/*' . self::CONFIG_EXTS, 'glob');
57
+        $loader->load($confDir . '/{services}' . self::CONFIG_EXTS, 'glob');
58
+        $loader->load($confDir . '/{services}_' . $this->environment . self::CONFIG_EXTS, 'glob');
59 59
     }
60 60
 
61 61
     protected function configureRoutes(RouteCollectionBuilder $routes): void
62 62
     {
63
-        $confDir = $this->getProjectDir().'/config';
63
+        $confDir = $this->getProjectDir() . '/config';
64 64
 
65
-        $routes->import($confDir.'/{routes}/'.$this->environment.'/*'.self::CONFIG_EXTS, '/', 'glob');
66
-        $routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob');
67
-        $routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob');
65
+        $routes->import($confDir . '/{routes}/' . $this->environment . '/*' . self::CONFIG_EXTS, '/', 'glob');
66
+        $routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS, '/', 'glob');
67
+        $routes->import($confDir . '/{routes}' . self::CONFIG_EXTS, '/', 'glob');
68 68
     }
69 69
 }
Please login to merge, or discard this patch.
tests/features/bootstrap/ServiceProviderContext.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         $request = Saml2AuthnRequest::createNew($authnRequest);
178 178
         $query = $request->buildRequestQuery();
179 179
 
180
-        $this->getSession()->visit($request->getDestination().'?'.$query);
180
+        $this->getSession()->visit($request->getDestination() . '?' . $query);
181 181
     }
182 182
 
183 183
     /**
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
         $request = Saml2AuthnRequest::createNew($authnRequest);
214 214
         $query = $request->buildRequestQuery();
215 215
 
216
-        $this->getSession()->visit($request->getDestination().'?'.$query);
216
+        $this->getSession()->visit($request->getDestination() . '?' . $query);
217 217
     }
218 218
 
219 219
     /**
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
         $request = Saml2AuthnRequest::createNew($authnRequest);
242 242
         $query = $request->buildRequestQuery();
243 243
 
244
-        $this->getSession()->visit($request->getDestination().'?'.$query);
244
+        $this->getSession()->visit($request->getDestination() . '?' . $query);
245 245
     }
246 246
 
247 247
     /**
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
         );
283 283
         $request = Saml2AuthnRequest::createNew($authnRequest);
284 284
         $query = $request->buildRequestQuery();
285
-        $this->getSession()->visit($request->getDestination().'?'.$query);
285
+        $this->getSession()->visit($request->getDestination() . '?' . $query);
286 286
     }
287 287
 
288 288
     /**
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
         );
310 310
         $request = Saml2AuthnRequest::createNew($authnRequest);
311 311
         $query = $request->buildRequestQuery();
312
-        $this->getSession()->visit($request->getDestination().'?'.$query);
312
+        $this->getSession()->visit($request->getDestination() . '?' . $query);
313 313
     }
314 314
 
315 315
     /**
Please login to merge, or discard this patch.