From 7715574a2e060f389210dbc6dbcea3291adf485d Mon Sep 17 00:00:00 2001 From: mcop1 Date: Thu, 9 Jan 2025 14:47:04 +0000 Subject: [PATCH] Apply php-cs-fixer changes --- src/CustomReport/Controller/Config/TreeController.php | 2 ++ src/CustomReport/Controller/TreeController.php | 2 ++ src/CustomReport/Hydrator/CustomReportHydratorInterface.php | 1 + src/CustomReport/Schema/CustomReportConfigTreeNode.php | 1 - src/CustomReport/Service/CustomReportServiceInterface.php | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/CustomReport/Controller/Config/TreeController.php b/src/CustomReport/Controller/Config/TreeController.php index 8be37aab..254117a3 100644 --- a/src/CustomReport/Controller/Config/TreeController.php +++ b/src/CustomReport/Controller/Config/TreeController.php @@ -34,6 +34,7 @@ use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Security\Http\Attribute\IsGranted; use Symfony\Component\Serializer\SerializerInterface; +use function count; /** * @internal @@ -73,6 +74,7 @@ public function __construct( public function getCustomReports(): JsonResponse { $items = $this->customReportService->getCustomReportConfigTree(); + return $this->getPaginatedCollection($this->serializer, $items, count($items)); } } diff --git a/src/CustomReport/Controller/TreeController.php b/src/CustomReport/Controller/TreeController.php index a7514d14..4bac6569 100644 --- a/src/CustomReport/Controller/TreeController.php +++ b/src/CustomReport/Controller/TreeController.php @@ -34,6 +34,7 @@ use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Security\Http\Attribute\IsGranted; use Symfony\Component\Serializer\SerializerInterface; +use function count; /** * @internal @@ -73,6 +74,7 @@ public function __construct( public function getCustomReports(): JsonResponse { $items = $this->customReportService->getCustomReportTree(); + return $this->getPaginatedCollection($this->serializer, $items, count($items)); } } diff --git a/src/CustomReport/Hydrator/CustomReportHydratorInterface.php b/src/CustomReport/Hydrator/CustomReportHydratorInterface.php index 956597ef..fad98ba0 100644 --- a/src/CustomReport/Hydrator/CustomReportHydratorInterface.php +++ b/src/CustomReport/Hydrator/CustomReportHydratorInterface.php @@ -22,5 +22,6 @@ interface CustomReportHydratorInterface { public function hydrateCustomReportTree(array $reports): array; + public function hydrateCustomReportConfigTree(array $reports): array; } diff --git a/src/CustomReport/Schema/CustomReportConfigTreeNode.php b/src/CustomReport/Schema/CustomReportConfigTreeNode.php index 4786d890..5c8df301 100644 --- a/src/CustomReport/Schema/CustomReportConfigTreeNode.php +++ b/src/CustomReport/Schema/CustomReportConfigTreeNode.php @@ -64,5 +64,4 @@ public function getWriteable(): string { return $this->writeable; } - } diff --git a/src/CustomReport/Service/CustomReportServiceInterface.php b/src/CustomReport/Service/CustomReportServiceInterface.php index 87a524bd..72375307 100644 --- a/src/CustomReport/Service/CustomReportServiceInterface.php +++ b/src/CustomReport/Service/CustomReportServiceInterface.php @@ -22,5 +22,6 @@ interface CustomReportServiceInterface { public function getCustomReportTree(): array; + public function getCustomReportConfigTree(): array; }