@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | public function auditLog(): string |
41 | 41 | { |
42 | - return sprintf(' (self vetted using LoA: %s)', (string)$this->authoringLoa()); |
|
42 | + return sprintf(' (self vetted using LoA: %s)', (string) $this->authoringLoa()); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | public function authoringLoa(): Loa |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | 'type' => $this->type(), |
54 | 54 | 'loa' => [ |
55 | 55 | 'level' => $this->authoringLoa->getLevel(), |
56 | - 'identifier' => (string)$this->authoringLoa, |
|
56 | + 'identifier' => (string) $this->authoringLoa, |
|
57 | 57 | ], |
58 | 58 | ]; |
59 | 59 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | return $this->phoneNumber; |
50 | 50 | } |
51 | 51 | |
52 | - public function equals(RecoveryTokenIdentifier|SecondFactorIdentifier $other): bool |
|
52 | + public function equals(RecoveryTokenIdentifier | SecondFactorIdentifier $other): bool |
|
53 | 53 | { |
54 | 54 | return $other instanceof self && $this->phoneNumber === $other->phoneNumber; |
55 | 55 | } |
@@ -80,7 +80,7 @@ |
||
80 | 80 | |
81 | 81 | public function __toString(): string |
82 | 82 | { |
83 | - return (string)$this->role; |
|
83 | + return (string) $this->role; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | public static function deserialize(array $data): self |
@@ -49,7 +49,7 @@ |
||
49 | 49 | { |
50 | 50 | return [ |
51 | 51 | 'type' => $this->type(), |
52 | - 'document_number' => (string)$this->getDocumentNumber(), |
|
52 | + 'document_number' => (string) $this->getDocumentNumber(), |
|
53 | 53 | ]; |
54 | 54 | } |
55 | 55 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | /** |
39 | 39 | * @var array |
40 | 40 | */ |
41 | - private array|null $configuration = null; |
|
41 | + private array | null $configuration = null; |
|
42 | 42 | |
43 | 43 | public static function create(): self |
44 | 44 | { |
@@ -48,7 +48,7 @@ |
||
48 | 48 | |
49 | 49 | array_walk( |
50 | 50 | $institutions, |
51 | - function ($institution, $key) use ($institutions): void { |
|
51 | + function($institution, $key) use ($institutions): void { |
|
52 | 52 | if (!is_string($institution) || trim($institution) === '') { |
53 | 53 | throw InvalidArgumentException::invalidType( |
54 | 54 | 'string', |
@@ -49,7 +49,7 @@ |
||
49 | 49 | // Verify only institutions are collected in the set |
50 | 50 | array_walk( |
51 | 51 | $institutions, |
52 | - function ($institution, $key) use ($institutions): void { |
|
52 | + function($institution, $key) use ($institutions): void { |
|
53 | 53 | if (!$institution instanceof Institution) { |
54 | 54 | throw InvalidArgumentException::invalidType( |
55 | 55 | Institution::class, |
@@ -34,12 +34,12 @@ |
||
34 | 34 | */ |
35 | 35 | public static function from(Institution $institution): self |
36 | 36 | { |
37 | - return new self((string)Uuid::uuid5(self::UUID_NAMESPACE, $institution->getInstitution())); |
|
37 | + return new self((string) Uuid::uuid5(self::UUID_NAMESPACE, $institution->getInstitution())); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | public static function normalizedFrom(Institution $institution): self |
41 | 41 | { |
42 | - return new self((string)Uuid::uuid5(self::UUID_NAMESPACE, strtolower($institution->getInstitution()))); |
|
42 | + return new self((string) Uuid::uuid5(self::UUID_NAMESPACE, strtolower($institution->getInstitution()))); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | public function __construct(string $institutionConfigurationId) |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | $metadata = $domainMessage->getMetadata()->serialize(); |
81 | 81 | $entry = new AuditLogEntry(); |
82 | - $entry->id = (string)Uuid::uuid4(); |
|
82 | + $entry->id = (string) Uuid::uuid4(); |
|
83 | 83 | |
84 | 84 | if (isset($metadata['actorId'])) { |
85 | 85 | $actor = $this->identityRepository->find($metadata['actorId']); |
@@ -103,36 +103,36 @@ discard block |
||
103 | 103 | $entry->actorInstitution = new Institution($metadata['actorInstitution']); |
104 | 104 | } |
105 | 105 | |
106 | - $entry->identityId = (string)$auditLogMetadata->identityId; |
|
106 | + $entry->identityId = (string) $auditLogMetadata->identityId; |
|
107 | 107 | $entry->identityInstitution = $auditLogMetadata->identityInstitution; |
108 | 108 | $entry->event = $event::class; |
109 | 109 | $entry->recordedOn = new DateTime(new CoreDateTime($domainMessage->getRecordedOn()->toString())); |
110 | 110 | |
111 | 111 | if ($auditLogMetadata->secondFactorId instanceof \Surfnet\Stepup\Identity\Value\SecondFactorId) { |
112 | - $entry->secondFactorId = (string)$auditLogMetadata->secondFactorId; |
|
112 | + $entry->secondFactorId = (string) $auditLogMetadata->secondFactorId; |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | if ($auditLogMetadata->secondFactorType instanceof \Surfnet\StepupBundle\Value\SecondFactorType) { |
116 | - $entry->secondFactorType = (string)$auditLogMetadata->secondFactorType; |
|
116 | + $entry->secondFactorType = (string) $auditLogMetadata->secondFactorType; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | if (!$event instanceof RecoveryTokenRevokedEvent |
120 | 120 | && !$event instanceof CompliedWithRecoveryCodeRevocationEvent |
121 | 121 | && $auditLogMetadata->recoveryTokenId |
122 | 122 | ) { |
123 | - $entry->recoveryTokenIdentifier = (string)$auditLogMetadata->recoveryTokenId; |
|
123 | + $entry->recoveryTokenIdentifier = (string) $auditLogMetadata->recoveryTokenId; |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | if ($auditLogMetadata->recoveryTokenType instanceof \Surfnet\Stepup\Identity\Value\RecoveryTokenType) { |
127 | - $entry->recoveryTokenType = (string)$auditLogMetadata->recoveryTokenType; |
|
127 | + $entry->recoveryTokenType = (string) $auditLogMetadata->recoveryTokenType; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | if ($auditLogMetadata->secondFactorIdentifier instanceof \Surfnet\Stepup\Identity\Value\SecondFactorIdentifier) { |
131 | - $entry->secondFactorIdentifier = (string)$auditLogMetadata->secondFactorIdentifier; |
|
131 | + $entry->secondFactorIdentifier = (string) $auditLogMetadata->secondFactorIdentifier; |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | if ($auditLogMetadata->raInstitution instanceof \Surfnet\Stepup\Identity\Value\Institution) { |
135 | - $entry->raInstitution = (string)$auditLogMetadata->raInstitution; |
|
135 | + $entry->raInstitution = (string) $auditLogMetadata->raInstitution; |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | $this->auditLogRepository->save($entry); |