From fba3f4b87f20b75df961d939820babb1dd53377d Mon Sep 17 00:00:00 2001 From: Jacob Tobiasz Date: Thu, 4 Jan 2024 16:57:34 +0100 Subject: [PATCH] Fix CI --- .../TwigComponent/Dashboard/StatisticsComponent.php | 4 ++++ .../Bundle/UiBundle/DataCollector/BlockRenderingHistory.php | 6 +++--- .../Bundle/UiBundle/Renderer/HtmlDebugTwigEventRenderer.php | 2 +- src/Sylius/Bundle/UiBundle/Twig/TemplateEventExtension.php | 1 + .../Component/Order/Repository/OrderRepositoryInterface.php | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Sylius/Bundle/AdminBundle/TwigComponent/Dashboard/StatisticsComponent.php b/src/Sylius/Bundle/AdminBundle/TwigComponent/Dashboard/StatisticsComponent.php index b7110e6183..eb397a0963 100644 --- a/src/Sylius/Bundle/AdminBundle/TwigComponent/Dashboard/StatisticsComponent.php +++ b/src/Sylius/Bundle/AdminBundle/TwigComponent/Dashboard/StatisticsComponent.php @@ -62,6 +62,10 @@ final class StatisticsComponent $this->eventName = 'sylius.admin.dashboard.statistics'; } + /** + * @return array + * @throws \Exception + */ #[ExposeInTemplate] public function getStatistics(): array { diff --git a/src/Sylius/Bundle/UiBundle/DataCollector/BlockRenderingHistory.php b/src/Sylius/Bundle/UiBundle/DataCollector/BlockRenderingHistory.php index 20c932cd20..1502ea6ecb 100644 --- a/src/Sylius/Bundle/UiBundle/DataCollector/BlockRenderingHistory.php +++ b/src/Sylius/Bundle/UiBundle/DataCollector/BlockRenderingHistory.php @@ -18,13 +18,13 @@ use Sylius\Bundle\UiBundle\Registry\Block; /** @internal */ final class BlockRenderingHistory { - /** @var array}> */ + /** @var array}> */ private $renderedEvents = []; - /** @var array}> */ + /** @var array}> */ private array $currentlyRenderedEvents = []; - /** @var array */ + /** @var array */ private array $currentlyRenderedBlocks = []; /** diff --git a/src/Sylius/Bundle/UiBundle/Renderer/HtmlDebugTwigEventRenderer.php b/src/Sylius/Bundle/UiBundle/Renderer/HtmlDebugTwigEventRenderer.php index 4f872a474b..41dbdfd8a2 100644 --- a/src/Sylius/Bundle/UiBundle/Renderer/HtmlDebugTwigEventRenderer.php +++ b/src/Sylius/Bundle/UiBundle/Renderer/HtmlDebugTwigEventRenderer.php @@ -27,7 +27,7 @@ final class HtmlDebugTwigEventRenderer implements TwigEventRendererInterface } /** - * @param array $eventNames + * @param non-empty-list $eventNames * @param array $context */ public function render(array $eventNames, array $context = []): string diff --git a/src/Sylius/Bundle/UiBundle/Twig/TemplateEventExtension.php b/src/Sylius/Bundle/UiBundle/Twig/TemplateEventExtension.php index 9a8f29b1f2..fc0de5c0db 100644 --- a/src/Sylius/Bundle/UiBundle/Twig/TemplateEventExtension.php +++ b/src/Sylius/Bundle/UiBundle/Twig/TemplateEventExtension.php @@ -43,6 +43,7 @@ final class TemplateEventExtension extends AbstractExtension } Assert::notEmpty($eventName); + /** @var non-empty-list $eventName */ $eventName = array_filter($eventName, fn (?string $eventName) => $eventName !== null); return $this->templateEventRenderer->render($eventName, $context); diff --git a/src/Sylius/Component/Order/Repository/OrderRepositoryInterface.php b/src/Sylius/Component/Order/Repository/OrderRepositoryInterface.php index 7e4b59773b..79e000057d 100644 --- a/src/Sylius/Component/Order/Repository/OrderRepositoryInterface.php +++ b/src/Sylius/Component/Order/Repository/OrderRepositoryInterface.php @@ -27,7 +27,7 @@ interface OrderRepositoryInterface extends RepositoryInterface public function countPlacedOrders(): int; /** - * @return array|OrderInterface[] + * @return array|T[] */ public function findLatest(int $count): array;