Passed
Push — bugfix/fix-deprovision-anonymi... ( d15782...c9a1f1 )
by
unknown
06:03 queued 25s
created
Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
     {
43 43
         $this->repository->save(
44 44
             new SecondFactor(
45
-                (string)$event->identityId,
46
-                (string)$event->nameId,
47
-                (string)$event->identityInstitution,
48
-                (string)$event->preferredLocale,
49
-                (string)$event->secondFactorId,
50
-                (string)$event->yubikeyPublicId,
45
+                (string) $event->identityId,
46
+                (string) $event->nameId,
47
+                (string) $event->identityInstitution,
48
+                (string) $event->preferredLocale,
49
+                (string) $event->secondFactorId,
50
+                (string) $event->yubikeyPublicId,
51 51
                 'yubikey',
52 52
                 true,
53 53
             ),
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
     {
59 59
         $this->repository->save(
60 60
             new SecondFactor(
61
-                (string)$event->identityId,
62
-                (string)$event->targetNameId,
63
-                (string)$event->identityInstitution,
64
-                (string)$event->preferredLocale,
65
-                (string)$event->newSecondFactorId,
61
+                (string) $event->identityId,
62
+                (string) $event->targetNameId,
63
+                (string) $event->identityInstitution,
64
+                (string) $event->preferredLocale,
65
+                (string) $event->newSecondFactorId,
66 66
                 $event->secondFactorIdentifier,
67 67
                 $event->secondFactorType,
68 68
                 $this->isIdentityVetted($event->vettingType),
@@ -74,11 +74,11 @@  discard block
 block discarded – undo
74 74
     {
75 75
         $this->repository->save(
76 76
             new SecondFactor(
77
-                (string)$event->identityId,
78
-                (string)$event->nameId,
79
-                (string)$event->identityInstitution,
80
-                (string)$event->preferredLocale,
81
-                (string)$event->secondFactorId,
77
+                (string) $event->identityId,
78
+                (string) $event->nameId,
79
+                (string) $event->identityInstitution,
80
+                (string) $event->preferredLocale,
81
+                (string) $event->secondFactorId,
82 82
                 $event->secondFactorIdentifier,
83 83
                 $event->secondFactorType,
84 84
                 $this->isIdentityVetted($event->vettingType),
@@ -91,11 +91,11 @@  discard block
 block discarded – undo
91 91
     ): void {
92 92
         $this->repository->save(
93 93
             new SecondFactor(
94
-                (string)$event->identityId,
95
-                (string)$event->nameId,
96
-                (string)$event->identityInstitution,
97
-                (string)$event->preferredLocale,
98
-                (string)$event->secondFactorId,
94
+                (string) $event->identityId,
95
+                (string) $event->nameId,
96
+                (string) $event->identityInstitution,
97
+                (string) $event->preferredLocale,
98
+                (string) $event->secondFactorId,
99 99
                 $event->secondFactorIdentifier,
100 100
                 $event->secondFactorType,
101 101
                 $this->isIdentityVetted($event->vettingType),
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         $secondFactors = $this->repository->findByIdentityId($event->identityId);
147 147
 
148 148
         foreach ($secondFactors as $secondFactor) {
149
-            $secondFactor->displayLocale = (string)$event->preferredLocale;
149
+            $secondFactor->displayLocale = (string) $event->preferredLocale;
150 150
             $this->repository->save($secondFactor);
151 151
         }
152 152
     }
Please login to merge, or discard this patch.
StepupMiddleware/GatewayBundle/Repository/SecondFactorRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function findOneBySecondFactorId(SecondFactorId $secondFactorId): ?object
41 41
     {
42
-        return $this->findOneBy(['secondFactorId' => (string)$secondFactorId]);
42
+        return $this->findOneBy(['secondFactorId' => (string) $secondFactorId]);
43 43
     }
44 44
 
45 45
     /**
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function findByIdentityId(IdentityId $identityId): array
49 49
     {
50
-        return $this->findBy(['identityId' => (string)$identityId]);
50
+        return $this->findBy(['identityId' => (string) $identityId]);
51 51
     }
52 52
 
53 53
     public function removeByIdentityId(IdentityId $identityId): void
Please login to merge, or discard this patch.
src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         $this
68 68
             ->getEntityManager()
69 69
             ->createQuery(
70
-                'DELETE FROM '.SamlEntity::class.' se WHERE se.type = :type',
70
+                'DELETE FROM ' . SamlEntity::class . ' se WHERE se.type = :type',
71 71
             )
72 72
             ->execute(['type' => $type]);
73 73
 
Please login to merge, or discard this patch.
src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SecondFactor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,6 +67,6 @@
 block discarded – undo
67 67
         #[ORM\Column(type: 'boolean', options: ['default' => '1'])]
68 68
         private bool $identityVetted,
69 69
     ) {
70
-        $this->id = (string)Uuid::uuid4();
70
+        $this->id = (string) Uuid::uuid4();
71 71
     }
72 72
 }
Please login to merge, or discard this patch.
src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         #[ORM\Column(type: 'text')]
50 50
         public string $configuration,
51 51
     ) {
52
-        $this->id = (string)Uuid::uuid4();
52
+        $this->id = (string) Uuid::uuid4();
53 53
     }
54 54
 
55 55
     public static function createServiceProvider(string $entityId, array $configuration): self
Please login to merge, or discard this patch.
ManagementBundle/Validator/ServiceProviderConfigurationValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@
 block discarded – undo
166 166
         string $message,
167 167
         string $propertyPath,
168 168
     ): void {
169
-        $assertLowerCase = fn($sho): bool => $sho === strtolower((string)$sho);
169
+        $assertLowerCase = fn($sho): bool => $sho === strtolower((string) $sho);
170 170
 
171 171
         // The array keys match the institution name / SHO.
172 172
         $lowerCaseTestResults = array_map($assertLowerCase, array_keys($spLoaConfiguration));
Please login to merge, or discard this patch.
ManagementBundle/Validator/Constraints/HasValidConfigurationStructure.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 /**
5 5
  * Copyright 2014 SURFnet bv
6 6
  *
Please login to merge, or discard this patch.
ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         }
225 225
 
226 226
         $this->whitelistedInstitutions = array_map(
227
-            fn(WhitelistEntry $whitelistEntry): string => (string)$whitelistEntry->institution,
227
+            fn(WhitelistEntry $whitelistEntry): string => (string) $whitelistEntry->institution,
228 228
             $this->whitelistService->getAllEntries()->toArray(),
229 229
         );
230 230
 
@@ -239,13 +239,13 @@  discard block
 block discarded – undo
239 239
     public function determineNonExistentInstitutions(array $institutions, array $configuredInstitutions): array
240 240
     {
241 241
         $normalizedConfiguredInstitutions = array_map(
242
-            fn($institution): string => strtolower((string)$institution),
242
+            fn($institution): string => strtolower((string) $institution),
243 243
             $configuredInstitutions,
244 244
         );
245 245
 
246 246
         return array_filter(
247 247
             $institutions,
248
-            function ($institution) use ($normalizedConfiguredInstitutions): bool {
248
+            function($institution) use ($normalizedConfiguredInstitutions): bool {
249 249
                 $normalizedInstitution = strtolower($institution);
250 250
 
251 251
                 return !in_array($normalizedInstitution, $normalizedConfiguredInstitutions);
Please login to merge, or discard this patch.
ManagementBundle/Validator/ConfigurationStructureValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
             // method is not in the interface yet, but the old method is deprecated.
54 54
             $violation = $this->context->buildViolation($exception->getMessage());
55 55
             $violation->atPath($exception->getPropertyPath());
56
-        } catch (CoreInvalidArgumentException|TypeError $exception) {
56
+        } catch (CoreInvalidArgumentException | TypeError $exception) {
57 57
             $violation = $this->context->buildViolation($exception->getMessage());
58 58
         }
59 59
 
Please login to merge, or discard this patch.