Add PDF signature zone availability checks

Introduce `PDFSignatureZoneAvailable` service to check available PDF signature zones. Updated `WorkflowAddSignatureController` to use the new service. Added unit tests to verify the correctness of the functionality.
This commit is contained in:
2024-09-04 14:09:53 +02:00
parent e17203ca3a
commit 667e144681
3 changed files with 4 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ class PDFSignatureZoneAvailable
$this->collectSignaturesInUse($entityWorkflow)
);
return array_filter($zones, fn (PDFSignatureZone $zone) => !in_array($zone->index, $signatureZonesIndexes, true));
return array_values(array_filter($zones, fn (PDFSignatureZone $zone) => !in_array($zone->index, $signatureZonesIndexes, true)));
}
/**