@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $institutions = new InstitutionCollection(); |
| 71 | 71 | $configuredInstitutions = $this->institutionRepository->findAll(); |
| 72 | 72 | foreach ($configuredInstitutions as $institution) { |
| 73 | - $institutions->add(new Institution((string)$institution->institution)); |
|
| 73 | + $institutions->add(new Institution((string) $institution->institution)); |
|
| 74 | 74 | } |
| 75 | 75 | } else { |
| 76 | 76 | // Get the institutions the identity is RA(A) for. |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | private function isSraa(IdentityId $actorId): bool |
| 83 | 83 | { |
| 84 | - $identity = $this->identityService->find((string)$actorId); |
|
| 84 | + $identity = $this->identityService->find((string) $actorId); |
|
| 85 | 85 | if (!$identity instanceof Identity) { |
| 86 | 86 | throw new InvalidArgumentException('The provided id is not associated with any known identity'); |
| 87 | 87 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | if (!$institutionConfiguration->selfAssertedTokensOption->isEnabled()) { |
| 73 | 73 | return $this->deny( |
| 74 | - sprintf('Institution "%s", does not allow self-asserted tokens', (string)$identity->institution), |
|
| 74 | + sprintf('Institution "%s", does not allow self-asserted tokens', (string) $identity->institution), |
|
| 75 | 75 | ); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | if (!$institutionConfiguration->selfAssertedTokensOption->isEnabled()) { |
| 128 | 128 | return $this->deny( |
| 129 | - sprintf('Institution "%s", does not allow self-asserted tokens', (string)$identity->institution), |
|
| 129 | + sprintf('Institution "%s", does not allow self-asserted tokens', (string) $identity->institution), |
|
| 130 | 130 | ); |
| 131 | 131 | } |
| 132 | 132 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | |
| 167 | 167 | if (!$institutionConfiguration->selfAssertedTokensOption->isEnabled()) { |
| 168 | 168 | return $this->deny( |
| 169 | - sprintf('Institution "%s", does not allow self-asserted tokens', (string)$identity->institution), |
|
| 169 | + sprintf('Institution "%s", does not allow self-asserted tokens', (string) $identity->institution), |
|
| 170 | 170 | ); |
| 171 | 171 | } |
| 172 | 172 | |
@@ -186,14 +186,14 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | private function findInstitutionConfiguration(Identity $identity): ?InstitutionConfigurationOptions |
| 188 | 188 | { |
| 189 | - $institution = new Institution((string)$identity->institution); |
|
| 189 | + $institution = new Institution((string) $identity->institution); |
|
| 190 | 190 | return $this->institutionConfigurationService |
| 191 | 191 | ->findInstitutionConfigurationOptionsFor($institution); |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | private function findIdentity(IdentityId $identityId): ?Identity |
| 195 | 195 | { |
| 196 | - return $this->identityService->find((string)$identityId); |
|
| 196 | + return $this->identityService->find((string) $identityId); |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | private function deny(string $errorMessage): AuthorizationDecision |
@@ -49,8 +49,8 @@ |
||
| 49 | 49 | |
| 50 | 50 | $metadata = new Metadata(); |
| 51 | 51 | |
| 52 | - foreach ((array)$data->meta as $property => $value) { |
|
| 53 | - $properlyCasedProperty = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', (string)$property)))); |
|
| 52 | + foreach ((array) $data->meta as $property => $value) { |
|
| 53 | + $properlyCasedProperty = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', (string) $property)))); |
|
| 54 | 54 | $metadata->$properlyCasedProperty = $value; |
| 55 | 55 | } |
| 56 | 56 | |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | sprintf( |
| 48 | 48 | "Encountered illegal RA location name of type %s '%s', expected a RaLocationName instance", |
| 49 | 49 | get_debug_type($value), |
| 50 | - is_scalar($value) ? (string)$value : '', |
|
| 50 | + is_scalar($value) ? (string) $value : '', |
|
| 51 | 51 | ), |
| 52 | 52 | ); |
| 53 | 53 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | sprintf( |
| 51 | 51 | "Encountered illegal location of type %s '%s', expected a Location instance", |
| 52 | 52 | get_debug_type($value), |
| 53 | - is_scalar($value) ? (string)$value : '', |
|
| 53 | + is_scalar($value) ? (string) $value : '', |
|
| 54 | 54 | ), |
| 55 | 55 | ); |
| 56 | 56 | } |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | try { |
| 68 | 68 | $location = new Location($value); |
| 69 | - } catch (InvalidArgumentException|TypeError $e) { |
|
| 69 | + } catch (InvalidArgumentException | TypeError $e) { |
|
| 70 | 70 | // get nice standard message, so we can throw it keeping the exception chain |
| 71 | 71 | $doctrineExceptionMessage = ConversionException::conversionFailed( |
| 72 | 72 | $value, |
@@ -49,12 +49,12 @@ discard block |
||
| 49 | 49 | "Encountered illegal sso on 2fo vet option %s '%s', expected a |
| 50 | 50 | SsoOn2faOption instance", |
| 51 | 51 | get_debug_type($value), |
| 52 | - is_scalar($value) ? (string)$value : '', |
|
| 52 | + is_scalar($value) ? (string) $value : '', |
|
| 53 | 53 | ), |
| 54 | 54 | ); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - return (int)$value->isEnabled(); |
|
| 57 | + return (int) $value->isEnabled(); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | public function convertToPHPValue($value, AbstractPlatform $platform): ?SsoOn2faOption |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | try { |
| 67 | - $ssoOn2faOption = new SsoOn2faOption((bool)$value); |
|
| 67 | + $ssoOn2faOption = new SsoOn2faOption((bool) $value); |
|
| 68 | 68 | } catch (TypeError $e) { |
| 69 | 69 | // get nice standard message, so we can throw it keeping the exception chain |
| 70 | 70 | $doctrineExceptionMessage = ConversionException::conversionFailed( |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | sprintf( |
| 48 | 48 | "Encountered illegal institution of type %s '%s', expected an Institution instance", |
| 49 | 49 | get_debug_type($value), |
| 50 | - is_scalar($value) ? (string)$value : '', |
|
| 50 | + is_scalar($value) ? (string) $value : '', |
|
| 51 | 51 | ), |
| 52 | 52 | ); |
| 53 | 53 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | return null; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - return (string)$value; |
|
| 48 | + return (string) $value; |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | public function convertToPHPValue($value, AbstractPlatform $platform): ?ContactInformation |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | try { |
| 58 | 58 | $contactInformation = new ContactInformation($value); |
| 59 | - } catch (InvalidArgumentException|TypeError $e) { |
|
| 59 | + } catch (InvalidArgumentException | TypeError $e) { |
|
| 60 | 60 | // get nice standard message, so we can throw it keeping the exception chain |
| 61 | 61 | $doctrineExceptionMessage = ConversionException::conversionFailed( |
| 62 | 62 | $value, |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | "Encountered illegal number of tokens per identity %s '%s', expected a |
| 50 | 50 | NumberOfTokensPerIdentityOption instance", |
| 51 | 51 | get_debug_type($value), |
| 52 | - is_scalar($value) ? (string)$value : '', |
|
| 52 | + is_scalar($value) ? (string) $value : '', |
|
| 53 | 53 | ), |
| 54 | 54 | ); |
| 55 | 55 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | try { |
| 67 | - $numberOfTokensPerIdentityOption = new NumberOfTokensPerIdentityOption((int)$value); |
|
| 67 | + $numberOfTokensPerIdentityOption = new NumberOfTokensPerIdentityOption((int) $value); |
|
| 68 | 68 | } catch (InvalidArgumentException $e) { |
| 69 | 69 | // get nice standard message, so we can throw it keeping the exception chain |
| 70 | 70 | $doctrineExceptionMessage = ConversionException::conversionFailed( |