Use readonly properties in constructors for better immutability.

Converted constructor properties to readonly where applicable, ensuring immutability and promoting safer code practices. Updated throwable class reference for clarity and consistency.
This commit is contained in:
2025-04-05 00:56:54 +02:00
parent 1955249a60
commit aebeca1d7a
2 changed files with 9 additions and 9 deletions

View File

@@ -28,11 +28,11 @@ use Symfony\Component\Serializer\SerializerInterface;
class ExportGenerationCreateFromSavedExportController
{
public function __construct(
private Security $security,
private EntityManagerInterface $entityManager,
private MessageBusInterface $messageBus,
private ClockInterface $clock,
private SerializerInterface $serializer,
private readonly Security $security,
private readonly EntityManagerInterface $entityManager,
private readonly MessageBusInterface $messageBus,
private readonly ClockInterface $clock,
private readonly SerializerInterface $serializer,
) {}
#[Route('/api/1.0/main/export/export-generation/create-from-saved-export/{id}', methods: ['POST'])]