Skip to content

Commit

Permalink
regels zogenaamd te lang
Browse files Browse the repository at this point in the history
  • Loading branch information
thijskh committed Sep 2, 2024
1 parent 9fa6561 commit d09d04b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/OpenConext/EngineBlock/Metadata/MfaEntityCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ public static function fromMetadataPush(array $data): MfaEntityCollection
foreach ($data as $mfaEntityData) {
$entityId = (string) $mfaEntityData['name'];
$level = (string) $mfaEntityData['level'];
Assertion::keyNotExists($entities, $entityId, sprintf('Duplicate SP entity ids are not allowed in MFA list: %s', $entityId));
Assertion::keyNotExists(
$entities,
$entityId,
sprintf('Duplicate SP entity ids are not allowed in MFA list: %s', $entityId)
);
$entities[$entityId] = MfaEntityFactory::from($entityId, $level);
}
return new self($entities);
Expand All @@ -59,7 +63,11 @@ public static function fromCoin(array $data): MfaEntityCollection
$entities = [];
foreach ($data as $mfaEntityData) {
$entity = MfaEntityFactory::fromJson($mfaEntityData);
Assertion::keyNotExists($entities, $entity->entityId(), sprintf('Duplicate SP entity ids are not allowed in coin MFA list: %s', $entity->entityId()));
Assertion::keyNotExists(
$entities,
$entity->entityId(),
sprintf('Duplicate SP entity ids are not allowed in coin MFA list: %s', $entity->entityId())
);
$entities[$entity->entityId()] = $entity;
}
return new self($entities);
Expand Down

0 comments on commit d09d04b

Please sign in to comment.