@@ -29,7 +29,7 @@ |
||
| 29 | 29 | $paginator->getNbResults(), |
| 30 | 30 | $paginator->getCurrentPage(), |
| 31 | 31 | $paginator->getMaxPerPage(), |
| 32 | - (array)$paginator->getCurrentPageResults(), |
|
| 32 | + (array) $paginator->getCurrentPageResults(), |
|
| 33 | 33 | [], |
| 34 | 34 | $filters, |
| 35 | 35 | ); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | public function applyNewInstitutionConfigurationCreatedEvent(NewInstitutionConfigurationCreatedEvent $event): void |
| 37 | 37 | { |
| 38 | 38 | $institutionConfiguration = new InstitutionConfiguration( |
| 39 | - (string)$event->institution, |
|
| 39 | + (string) $event->institution, |
|
| 40 | 40 | $event->ssoOn2faOption->isEnabled(), |
| 41 | 41 | ); |
| 42 | 42 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | public function applySsoOn2faOptionChangedEvent(SsoOn2faOptionChangedEvent $event): void |
| 47 | 47 | { |
| 48 | - $institutionConfiguration = $this->repository->findByInstitution((string)$event->institution); |
|
| 48 | + $institutionConfiguration = $this->repository->findByInstitution((string) $event->institution); |
|
| 49 | 49 | if ($institutionConfiguration instanceof InstitutionConfiguration) { |
| 50 | 50 | $institutionConfiguration->ssoOn2faEnabled = $event->ssoOn2faOption->isEnabled(); |
| 51 | 51 | $this->repository->save($institutionConfiguration); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | // It can happen that the event changed for an institution that already exists, but is not yet projected to |
| 55 | 55 | // this projection. In that case we can create it. |
| 56 | 56 | $institutionConfiguration = new InstitutionConfiguration( |
| 57 | - (string)$event->institution, |
|
| 57 | + (string) $event->institution, |
|
| 58 | 58 | $event->ssoOn2faOption->isEnabled(), |
| 59 | 59 | ); |
| 60 | 60 | $this->repository->save($institutionConfiguration); |
@@ -62,6 +62,6 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | public function applyInstitutionConfigurationRemovedEvent(InstitutionConfigurationRemovedEvent $event): void |
| 64 | 64 | { |
| 65 | - $this->repository->removeFor((string)$event->institution); |
|
| 65 | + $this->repository->removeFor((string) $event->institution); |
|
| 66 | 66 | } |
| 67 | 67 | } |
@@ -42,12 +42,12 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -39,7 +39,7 @@ discard block |
||
| 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 |
||
| 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 |
@@ -67,7 +67,7 @@ |
||
| 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 | |
@@ -67,6 +67,6 @@ |
||
| 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 | } |
@@ -49,7 +49,7 @@ |
||
| 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 |
@@ -166,7 +166,7 @@ |
||
| 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)); |
@@ -1,6 +1,6 @@ |
||
| 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 | * |