mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Rector changes
This commit is contained in:
parent
018f8aef5c
commit
a915c35026
@ -31,12 +31,12 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
class SocialWorkExportController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
private SocialIssueRepository $socialIssueRepository,
|
||||
private SocialActionRepository $socialActionRepository,
|
||||
private Security $security,
|
||||
private TranslatorInterface $translator,
|
||||
private SocialIssueRender $socialIssueRender,
|
||||
private SocialActionRender $socialActionRender,
|
||||
private readonly SocialIssueRepository $socialIssueRepository,
|
||||
private readonly SocialActionRepository $socialActionRepository,
|
||||
private readonly Security $security,
|
||||
private readonly TranslatorInterface $translator,
|
||||
private readonly SocialIssueRender $socialIssueRender,
|
||||
private readonly SocialActionRender $socialActionRender,
|
||||
) {}
|
||||
|
||||
/**
|
||||
@ -53,14 +53,12 @@ class SocialWorkExportController extends AbstractController
|
||||
|
||||
$socialIssues = $this->socialIssueRepository->findAll();
|
||||
|
||||
$socialIssues = array_map(function ($issue) {
|
||||
return [
|
||||
'id' => $issue->getId(),
|
||||
'title' => $this->socialIssueRender->renderString($issue, []),
|
||||
'ordering' => $issue->getOrdering(),
|
||||
'desactivationDate' => $issue->getDesactivationDate(),
|
||||
];
|
||||
}, $socialIssues);
|
||||
$socialIssues = array_map(fn($issue) => [
|
||||
'id' => $issue->getId(),
|
||||
'title' => $this->socialIssueRender->renderString($issue, []),
|
||||
'ordering' => $issue->getOrdering(),
|
||||
'desactivationDate' => $issue->getDesactivationDate(),
|
||||
], $socialIssues);
|
||||
|
||||
$csv = Writer::createFromPath('php://temp', 'r+');
|
||||
$csv->insertOne(
|
||||
@ -108,15 +106,13 @@ class SocialWorkExportController extends AbstractController
|
||||
|
||||
$socialActions = $this->socialActionRepository->findAll();
|
||||
|
||||
$socialActions = array_map(function ($action) {
|
||||
return [
|
||||
'id' => $action->getId(),
|
||||
'title' => $this->socialActionRender->renderString($action, []),
|
||||
'desactivationDate' => $action->getDesactivationDate(),
|
||||
'socialIssue' => $this->socialIssueRender->renderString($action->getIssue(), []),
|
||||
'ordering' => $action->getOrdering(),
|
||||
];
|
||||
}, $socialActions);
|
||||
$socialActions = array_map(fn($action) => [
|
||||
'id' => $action->getId(),
|
||||
'title' => $this->socialActionRender->renderString($action, []),
|
||||
'desactivationDate' => $action->getDesactivationDate(),
|
||||
'socialIssue' => $this->socialIssueRender->renderString($action->getIssue(), []),
|
||||
'ordering' => $action->getOrdering(),
|
||||
], $socialActions);
|
||||
|
||||
$csv = Writer::createFromPath('php://temp', 'r+');
|
||||
$csv->insertOne(
|
||||
|
Loading…
x
Reference in New Issue
Block a user