@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | ->where("r.identityId = :identityId AND r.role IN(:roles)") |
74 | 74 | ->groupBy("a.institution"); |
75 | 75 | |
76 | - $qb->setParameter('identityId', (string)$actorId); |
|
76 | + $qb->setParameter('identityId', (string) $actorId); |
|
77 | 77 | $qb->setParameter( |
78 | 78 | 'authorizationRoles', |
79 | 79 | $this->getAllowedInstitutionRoles($role) |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $this->logger->notice( |
89 | 89 | sprintf('Adding %s to authorized institutions', $institution['institution']) |
90 | 90 | ); |
91 | - $result->add(new Institution((string)$institution['institution'])); |
|
91 | + $result->add(new Institution((string) $institution['institution'])); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | // Also get the institutions that are linked to the user via the 'institution_relation' field. |
@@ -102,12 +102,12 @@ discard block |
||
102 | 102 | ->andWhere("ia.institutionRole = :role") // Only filter on use_ra and use_raa roles here. |
103 | 103 | ->groupBy('ia.institution'); |
104 | 104 | |
105 | - $qb->setParameter('identityId', (string)$actorId); |
|
105 | + $qb->setParameter('identityId', (string) $actorId); |
|
106 | 106 | $qb->setParameter('role', $role->getType()); |
107 | 107 | |
108 | 108 | $institutions = $qb->getQuery()->getArrayResult(); |
109 | 109 | foreach ($institutions as $institution) { |
110 | - $institutionVo = new Institution((string)$institution['institution']); |
|
110 | + $institutionVo = new Institution((string) $institution['institution']); |
|
111 | 111 | if (!$result->contains($institutionVo)) { |
112 | 112 | $result->add($institutionVo); |
113 | 113 | $this->logger->notice( |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | ->where('ia.institutionRole = :institutionRole AND ra.role = :authorizationRole') |
135 | 135 | ->groupBy("ci.institution"); |
136 | 136 | |
137 | - $qb->setParameter('identityId', (string)$actorId); |
|
137 | + $qb->setParameter('identityId', (string) $actorId); |
|
138 | 138 | // The identity requires RAA role to perform this search |
139 | 139 | $qb->setParameter( |
140 | 140 | 'authorizationRole', |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | $result = new InstitutionCollection(); |
152 | 152 | foreach ($institutions as $institution) { |
153 | - $result->add(new Institution((string)$institution['institution'])); |
|
153 | + $result->add(new Institution((string) $institution['institution'])); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | return $result; |
@@ -83,7 +83,7 @@ |
||
83 | 83 | ->where('r.identityId = :identityId') |
84 | 84 | ->andWhere('r.raInstitution = :raInstitution') |
85 | 85 | ->setParameter('identityId', $identityId) |
86 | - ->setParameter('raInstitution', (string)$raInstitution) |
|
86 | + ->setParameter('raInstitution', (string) $raInstitution) |
|
87 | 87 | ->orderBy('r.raInstitution'); |
88 | 88 | |
89 | 89 | // Modify query to filter on authorization: |
@@ -44,7 +44,7 @@ |
||
44 | 44 | { |
45 | 45 | $existsQuery = $this->createQueryBuilder('i') |
46 | 46 | ->where('i.institution = :institution') |
47 | - ->setParameter('institution', (string)$institution) |
|
47 | + ->setParameter('institution', (string) $institution) |
|
48 | 48 | ->getQuery() |
49 | 49 | ->getOneOrNullResult(); |
50 | 50 |
@@ -189,13 +189,13 @@ |
||
189 | 189 | { |
190 | 190 | return [ |
191 | 191 | 'actor_id' => $this->actorId, |
192 | - 'actor_institution' => $this->actorInstitution ? (string)$this->actorInstitution : null, |
|
192 | + 'actor_institution' => $this->actorInstitution ? (string) $this->actorInstitution : null, |
|
193 | 193 | 'actor_common_name' => $this->actorCommonName, |
194 | 194 | 'identity_id' => $this->identityId, |
195 | - 'identity_institution' => (string)$this->identityInstitution, |
|
196 | - 'ra_institution' => (string)$this->raInstitution, |
|
195 | + 'identity_institution' => (string) $this->identityInstitution, |
|
196 | + 'ra_institution' => (string) $this->raInstitution, |
|
197 | 197 | 'second_factor_id' => $this->secondFactorId, |
198 | - 'second_factor_type' => $this->secondFactorType ? (string)$this->secondFactorType : null, |
|
198 | + 'second_factor_type' => $this->secondFactorType ? (string) $this->secondFactorType : null, |
|
199 | 199 | 'second_factor_identifier' => $this->secondFactorIdentifier, |
200 | 200 | 'recovery_token_type' => $this->recoveryTokenType, |
201 | 201 | 'recovery_token_identifier' => $this->recoveryTokenIdentifier, |
@@ -83,7 +83,7 @@ |
||
83 | 83 | $raListings = $this->raListingRepository->listRasFor($institution); |
84 | 84 | |
85 | 85 | return $raListings |
86 | - ->map(function (RaListing $raListing) { |
|
86 | + ->map(function(RaListing $raListing) { |
|
87 | 87 | return RegistrationAuthorityCredentials::fromRaListing($raListing); |
88 | 88 | }) |
89 | 89 | ->toArray(); |
@@ -67,8 +67,8 @@ |
||
67 | 67 | $results = $doctrineQuery->getArrayResult(); |
68 | 68 | foreach ($results as $options) { |
69 | 69 | foreach ($options as $key => $value) { |
70 | - $val = (string)$value; |
|
71 | - $filters[$key][$val] = (string)$val; |
|
70 | + $val = (string) $value; |
|
71 | + $filters[$key][$val] = (string) $val; |
|
72 | 72 | } |
73 | 73 | } |
74 | 74 |
@@ -77,14 +77,14 @@ |
||
77 | 77 | |
78 | 78 | public function applyCompliedWithRecoveryCodeRevocationEvent(CompliedWithRecoveryCodeRevocationEvent $event): void |
79 | 79 | { |
80 | - $token = $this->recoveryTokenRepository->find((string)$event->recoveryTokenId); |
|
80 | + $token = $this->recoveryTokenRepository->find((string) $event->recoveryTokenId); |
|
81 | 81 | $token->status = RecoveryTokenStatus::revoked(); |
82 | 82 | $this->recoveryTokenRepository->save($token); |
83 | 83 | } |
84 | 84 | |
85 | 85 | public function applyRecoveryTokenRevokedEvent(RecoveryTokenRevokedEvent $event): void |
86 | 86 | { |
87 | - $token = $this->recoveryTokenRepository->find((string)$event->recoveryTokenId); |
|
87 | + $token = $this->recoveryTokenRepository->find((string) $event->recoveryTokenId); |
|
88 | 88 | $token->status = RecoveryTokenStatus::revoked(); |
89 | 89 | $this->recoveryTokenRepository->save($token); |
90 | 90 | } |
@@ -74,7 +74,7 @@ |
||
74 | 74 | $query->nameId = $request->get('NameID'); |
75 | 75 | $query->commonName = $request->get('commonName'); |
76 | 76 | $query->email = $request->get('email'); |
77 | - $query->pageNumber = (int)$request->get('p', 1); |
|
77 | + $query->pageNumber = (int) $request->get('p', 1); |
|
78 | 78 | |
79 | 79 | $paginator = $this->identityService->search($query); |
80 | 80 |
@@ -81,7 +81,7 @@ |
||
81 | 81 | $actorId = new IdentityId($request->get('actorId')); |
82 | 82 | |
83 | 83 | $query = new RaSecondFactorQuery(); |
84 | - $query->pageNumber = (int)$request->get('p', 1); |
|
84 | + $query->pageNumber = (int) $request->get('p', 1); |
|
85 | 85 | $query->name = $request->get('name'); |
86 | 86 | $query->type = $request->get('type'); |
87 | 87 | $query->secondFactorId = $request->get('secondFactorId'); |