@@ -122,7 +122,7 @@ |
||
| 122 | 122 | |
| 123 | 123 | public function serialize(): array |
| 124 | 124 | { |
| 125 | - return array_map(fn(Institution $institution): string => (string)$institution, $this->elements); |
|
| 125 | + return array_map(fn(Institution $institution): string => (string) $institution, $this->elements); |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | /** |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * @return Pagerfanta<T> |
| 36 | 36 | */ |
| 37 | 37 | protected function createPaginatorFrom( |
| 38 | - QueryBuilder|Query $doctrineQuery, |
|
| 38 | + QueryBuilder | Query $doctrineQuery, |
|
| 39 | 39 | AbstractQuery $query, |
| 40 | 40 | bool $fetchCollection = true, |
| 41 | 41 | ): Pagerfanta { |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $results = $doctrineQuery->getArrayResult(); |
| 72 | 72 | foreach ($results as $options) { |
| 73 | 73 | foreach ($options as $key => $value) { |
| 74 | - $val = (string)$value; |
|
| 74 | + $val = (string) $value; |
|
| 75 | 75 | $filters[$key][$val] = $val; |
| 76 | 76 | } |
| 77 | 77 | } |
@@ -45,18 +45,18 @@ |
||
| 45 | 45 | |
| 46 | 46 | /** @var Institution $institution */ |
| 47 | 47 | foreach ($raInstitutions as $institution) { |
| 48 | - $collection->authorizations[(string)$institution][] = AuthorityRole::ROLE_RA; |
|
| 48 | + $collection->authorizations[(string) $institution][] = AuthorityRole::ROLE_RA; |
|
| 49 | 49 | } |
| 50 | 50 | if ($raaInstitutions instanceof InstitutionCollection) { |
| 51 | 51 | /** @var Institution $institution */ |
| 52 | 52 | foreach ($raaInstitutions as $institution) { |
| 53 | 53 | // Override existing lower role |
| 54 | - if (isset($collection->authorizations[(string)$institution]) |
|
| 55 | - && in_array(AuthorityRole::ROLE_RA, $collection->authorizations[(string)$institution]) |
|
| 54 | + if (isset($collection->authorizations[(string) $institution]) |
|
| 55 | + && in_array(AuthorityRole::ROLE_RA, $collection->authorizations[(string) $institution]) |
|
| 56 | 56 | ) { |
| 57 | - $collection->authorizations[(string)$institution] = []; |
|
| 57 | + $collection->authorizations[(string) $institution] = []; |
|
| 58 | 58 | } |
| 59 | - $collection->authorizations[(string)$institution][] = AuthorityRole::ROLE_RAA; |
|
| 59 | + $collection->authorizations[(string) $institution][] = AuthorityRole::ROLE_RAA; |
|
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | return $collection; |
@@ -129,7 +129,7 @@ |
||
| 129 | 129 | foreach ($configuration as $institution => $options) { |
| 130 | 130 | assert(is_array($options)); |
| 131 | 131 | $command = new ReconfigureInstitutionConfigurationOptionsCommand(); |
| 132 | - $command->UUID = (string)Uuid::uuid4(); |
|
| 132 | + $command->UUID = (string) Uuid::uuid4(); |
|
| 133 | 133 | $command->institution = $institution; |
| 134 | 134 | $command->useRaLocationsOption = $options['use_ra_locations']; |
| 135 | 135 | $command->showRaaContactInformationOption = $options['show_raa_contact_information']; |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | if ($query->identityId instanceof IdentityId) { |
| 51 | 51 | $queryBuilder |
| 52 | 52 | ->andWhere('sf.identityId = :identityId') |
| 53 | - ->setParameter('identityId', (string)$query->identityId); |
|
| 53 | + ->setParameter('identityId', (string) $query->identityId); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | return $queryBuilder->getQuery(); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | $metadata = $domainMessage->getMetadata()->serialize(); |
| 84 | 84 | $entry = new AuditLogEntry(); |
| 85 | - $entry->id = (string)Uuid::uuid4(); |
|
| 85 | + $entry->id = (string) Uuid::uuid4(); |
|
| 86 | 86 | |
| 87 | 87 | if (isset($metadata['actorId'])) { |
| 88 | 88 | $actor = $this->identityRepository->find($metadata['actorId']); |
@@ -106,36 +106,36 @@ discard block |
||
| 106 | 106 | $entry->actorInstitution = new Institution($metadata['actorInstitution']); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | - $entry->identityId = (string)$auditLogMetadata->identityId; |
|
| 109 | + $entry->identityId = (string) $auditLogMetadata->identityId; |
|
| 110 | 110 | $entry->identityInstitution = $auditLogMetadata->identityInstitution; |
| 111 | 111 | $entry->event = $event::class; |
| 112 | 112 | $entry->recordedOn = new DateTime(new CoreDateTime($domainMessage->getRecordedOn()->toString())); |
| 113 | 113 | |
| 114 | 114 | if ($auditLogMetadata->secondFactorId instanceof SecondFactorId) { |
| 115 | - $entry->secondFactorId = (string)$auditLogMetadata->secondFactorId; |
|
| 115 | + $entry->secondFactorId = (string) $auditLogMetadata->secondFactorId; |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | if ($auditLogMetadata->secondFactorType instanceof SecondFactorType) { |
| 119 | - $entry->secondFactorType = (string)$auditLogMetadata->secondFactorType; |
|
| 119 | + $entry->secondFactorType = (string) $auditLogMetadata->secondFactorType; |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | if (!$event instanceof RecoveryTokenRevokedEvent |
| 123 | 123 | && !$event instanceof CompliedWithRecoveryCodeRevocationEvent |
| 124 | 124 | && $auditLogMetadata->recoveryTokenId |
| 125 | 125 | ) { |
| 126 | - $entry->recoveryTokenIdentifier = (string)$auditLogMetadata->recoveryTokenId; |
|
| 126 | + $entry->recoveryTokenIdentifier = (string) $auditLogMetadata->recoveryTokenId; |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | if ($auditLogMetadata->recoveryTokenType instanceof RecoveryTokenType) { |
| 130 | - $entry->recoveryTokenType = (string)$auditLogMetadata->recoveryTokenType; |
|
| 130 | + $entry->recoveryTokenType = (string) $auditLogMetadata->recoveryTokenType; |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | if ($auditLogMetadata->secondFactorIdentifier instanceof SecondFactorIdentifier) { |
| 134 | - $entry->secondFactorIdentifier = (string)$auditLogMetadata->secondFactorIdentifier; |
|
| 134 | + $entry->secondFactorIdentifier = (string) $auditLogMetadata->secondFactorIdentifier; |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | if ($auditLogMetadata->raInstitution instanceof Institution) { |
| 138 | - $entry->raInstitution = (string)$auditLogMetadata->raInstitution; |
|
| 138 | + $entry->raInstitution = (string) $auditLogMetadata->raInstitution; |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | $this->auditLogRepository->save($entry); |
@@ -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) { |
@@ -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 | } |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | if ($query->identityId instanceof IdentityId) { |
| 54 | 54 | $queryBuilder |
| 55 | 55 | ->andWhere('sf.identityId = :identityId') |
| 56 | - ->setParameter('identityId', (string)$query->identityId); |
|
| 56 | + ->setParameter('identityId', (string) $query->identityId); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | if ($query->verificationNonce) { |
@@ -76,13 +76,13 @@ discard block |
||
| 76 | 76 | if ($query->identityId instanceof IdentityId) { |
| 77 | 77 | $queryBuilder |
| 78 | 78 | ->andWhere('sf.identityId = :identityId') |
| 79 | - ->setParameter('identityId', (string)$query->identityId); |
|
| 79 | + ->setParameter('identityId', (string) $query->identityId); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | if ($query->secondFactorId instanceof SecondFactorId) { |
| 83 | 83 | $queryBuilder |
| 84 | 84 | ->andWhere('sf.id = :secondFactorId') |
| 85 | - ->setParameter('secondFactorId', (string)$query->secondFactorId); |
|
| 85 | + ->setParameter('secondFactorId', (string) $query->secondFactorId); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | if (is_string($query->registrationCode)) { |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | $queryBuilder |
| 111 | 111 | ->andWhere('sf.identityId = :identityId') |
| 112 | - ->setParameter('identityId', (string)$query->identityId); |
|
| 112 | + ->setParameter('identityId', (string) $query->identityId); |
|
| 113 | 113 | |
| 114 | 114 | return $queryBuilder->getQuery(); |
| 115 | 115 | } |