@@ -45,14 +45,14 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | public function findByIdentityId(IdentityId $identityId): ?array |
| 47 | 47 | { |
| 48 | - return parent::findBy(['identityId' => (string)$identityId]); |
|
| 48 | + return parent::findBy(['identityId' => (string) $identityId]); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | public function findByIdentityIdAndRaInstitution(IdentityId $identityId, Institution $raInstitution): ?RaListing |
| 52 | 52 | { |
| 53 | 53 | return parent::findOneBy([ |
| 54 | - 'identityId' => (string)$identityId, |
|
| 55 | - 'raInstitution' => (string)$raInstitution, |
|
| 54 | + 'identityId' => (string) $identityId, |
|
| 55 | + 'raInstitution' => (string) $raInstitution, |
|
| 56 | 56 | ]); |
| 57 | 57 | } |
| 58 | 58 | |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | ->where('r.identityId = :identityId') |
| 66 | 66 | ->andWhere('r.raInstitution = :raInstitution') |
| 67 | 67 | ->setParameter('identityId', $identityId) |
| 68 | - ->setParameter('raInstitution', (string)$raInstitution) |
|
| 68 | + ->setParameter('raInstitution', (string) $raInstitution) |
|
| 69 | 69 | ->orderBy('r.raInstitution'); |
| 70 | 70 | |
| 71 | 71 | // Modify query to filter on authorization: |
@@ -88,8 +88,8 @@ discard block |
||
| 88 | 88 | public function findByIdentityIdAndInstitution(IdentityId $identityId, Institution $institution): array |
| 89 | 89 | { |
| 90 | 90 | return parent::findBy([ |
| 91 | - 'identityId' => (string)$identityId, |
|
| 92 | - 'institution' => (string)$institution, |
|
| 91 | + 'identityId' => (string) $identityId, |
|
| 92 | + 'institution' => (string) $institution, |
|
| 93 | 93 | ]); |
| 94 | 94 | } |
| 95 | 95 | |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | if ($query->identityId instanceof IdentityId) { |
| 117 | 117 | $queryBuilder |
| 118 | 118 | ->andWhere('r.identityId = :identityId') |
| 119 | - ->setParameter('identityId', (string)$query->identityId); |
|
| 119 | + ->setParameter('identityId', (string) $query->identityId); |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | if ($query->name) { |
@@ -134,13 +134,13 @@ discard block |
||
| 134 | 134 | if ($query->role) { |
| 135 | 135 | $queryBuilder |
| 136 | 136 | ->andWhere('r.role = :role') |
| 137 | - ->setParameter('role', (string)$query->role); |
|
| 137 | + ->setParameter('role', (string) $query->role); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | if ($query->raInstitution) { |
| 141 | 141 | $queryBuilder |
| 142 | 142 | ->andWhere('r.raInstitution = :raInstitution') |
| 143 | - ->setParameter('raInstitution', (string)$query->raInstitution); |
|
| 143 | + ->setParameter('raInstitution', (string) $query->raInstitution); |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | // Modify query to filter on authorization: |
@@ -240,6 +240,6 @@ discard block |
||
| 240 | 240 | |
| 241 | 241 | public function contains(IdentityId $identityId): bool |
| 242 | 242 | { |
| 243 | - return count(parent::findBy(['identityId' => (string)$identityId])) > 0; |
|
| 243 | + return count(parent::findBy(['identityId' => (string) $identityId])) > 0; |
|
| 244 | 244 | } |
| 245 | 245 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | public function applyNewInstitutionConfigurationCreatedEvent(NewInstitutionConfigurationCreatedEvent $event): void |
| 38 | 38 | { |
| 39 | 39 | $institutionConfiguration = new InstitutionConfiguration( |
| 40 | - (string)$event->institution, |
|
| 40 | + (string) $event->institution, |
|
| 41 | 41 | $event->ssoOn2faOption->isEnabled(), |
| 42 | 42 | ); |
| 43 | 43 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | public function applySsoOn2faOptionChangedEvent(SsoOn2faOptionChangedEvent $event): void |
| 48 | 48 | { |
| 49 | - $institutionConfiguration = $this->repository->findByInstitution((string)$event->institution); |
|
| 49 | + $institutionConfiguration = $this->repository->findByInstitution((string) $event->institution); |
|
| 50 | 50 | if ($institutionConfiguration instanceof InstitutionConfiguration) { |
| 51 | 51 | $institutionConfiguration->ssoOn2faEnabled = $event->ssoOn2faOption->isEnabled(); |
| 52 | 52 | $this->repository->save($institutionConfiguration); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | // It can happen that the event changed for an institution that already exists, but is not yet projected to |
| 56 | 56 | // this projection. In that case we can create it. |
| 57 | 57 | $institutionConfiguration = new InstitutionConfiguration( |
| 58 | - (string)$event->institution, |
|
| 58 | + (string) $event->institution, |
|
| 59 | 59 | $event->ssoOn2faOption->isEnabled(), |
| 60 | 60 | ); |
| 61 | 61 | $this->repository->save($institutionConfiguration); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | public function applyInstitutionConfigurationRemovedEvent(InstitutionConfigurationRemovedEvent $event): void |
| 65 | 65 | { |
| 66 | - $this->repository->removeFor((string)$event->institution); |
|
| 66 | + $this->repository->removeFor((string) $event->institution); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void |