mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix string formatting style in SavedExportController
Replaced double quotes with single quotes for consistency in exception messages and translatable strings. This change improves code readability and maintains uniformity across the file.
This commit is contained in:
parent
d49058805a
commit
a6e523ee0a
@ -118,7 +118,7 @@ final readonly class SavedExportController
|
||||
public function duplicate(SavedExport $previousSavedExport, Request $request): Response
|
||||
{
|
||||
if (!$this->security->isGranted(SavedExportVoter::GENERATE, $previousSavedExport)) {
|
||||
throw new AccessDeniedHttpException("Not allowed to see this saved export");
|
||||
throw new AccessDeniedHttpException('Not allowed to see this saved export');
|
||||
}
|
||||
|
||||
$user = $this->security->getUser();
|
||||
@ -135,7 +135,7 @@ final readonly class SavedExportController
|
||||
->setTitle(
|
||||
$request->query->has('title') ?
|
||||
$request->query->get('title') :
|
||||
$previousSavedExport->getTitle() . ' (' . $this->translator->trans('saved_export.Duplicated') . ' ' . (new \DateTimeImmutable('now'))->format('d-m-Y H:i:s') . ')'
|
||||
$previousSavedExport->getTitle().' ('.$this->translator->trans('saved_export.Duplicated').' '.(new \DateTimeImmutable('now'))->format('d-m-Y H:i:s').')'
|
||||
);
|
||||
|
||||
return $this->handleEdit($savedExport, $request);
|
||||
@ -207,15 +207,15 @@ final readonly class SavedExportController
|
||||
public function updateOptionsFromGeneration(SavedExport $savedExport, ExportGeneration $exportGeneration, Request $request): Response
|
||||
{
|
||||
if (!$this->security->isGranted(SavedExportVoter::EDIT, $savedExport)) {
|
||||
throw new AccessDeniedHttpException("You are not allowed to access this saved export");
|
||||
throw new AccessDeniedHttpException('You are not allowed to access this saved export');
|
||||
}
|
||||
|
||||
if (!$this->security->isGranted(ExportGenerationVoter::VIEW, $exportGeneration)) {
|
||||
throw new AccessDeniedHttpException("You are not allowed to access this export generation");
|
||||
throw new AccessDeniedHttpException('You are not allowed to access this export generation');
|
||||
}
|
||||
|
||||
if ($savedExport->getExportAlias() !== $exportGeneration->getExportAlias()) {
|
||||
throw new UnprocessableEntityHttpException("export alias does not match");
|
||||
throw new UnprocessableEntityHttpException('export alias does not match');
|
||||
}
|
||||
|
||||
$savedExport->setOptions($exportGeneration->getOptions());
|
||||
@ -224,7 +224,7 @@ final readonly class SavedExportController
|
||||
|
||||
$session = $request->getSession();
|
||||
if ($session instanceof Session) {
|
||||
$session->getFlashBag()->add('success', new TranslatableMessage("saved_export.Options updated successfully"));
|
||||
$session->getFlashBag()->add('success', new TranslatableMessage('saved_export.Options updated successfully'));
|
||||
}
|
||||
|
||||
return new RedirectResponse(
|
||||
|
Loading…
x
Reference in New Issue
Block a user