From 2a21598ad1c128f2d1fa80afae450d3d60725f06 Mon Sep 17 00:00:00 2001 From: Jacob Tobiasz Date: Tue, 12 Sep 2023 08:57:03 +0200 Subject: [PATCH] Provide ECS fixes --- .../Bundle/AddressingBundle/Repository/ZoneRepository.php | 3 ++- .../AddressingBundle/Repository/ZoneRepositoryInterface.php | 1 + src/Sylius/Component/Addressing/Matcher/ZoneMatcher.php | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Sylius/Bundle/AddressingBundle/Repository/ZoneRepository.php b/src/Sylius/Bundle/AddressingBundle/Repository/ZoneRepository.php index 206abd68d0bd..25b47cdf9f5e 100644 --- a/src/Sylius/Bundle/AddressingBundle/Repository/ZoneRepository.php +++ b/src/Sylius/Bundle/AddressingBundle/Repository/ZoneRepository.php @@ -90,13 +90,14 @@ private function getFindByAddressQueryBuilder(AddressInterface $address, ?string /** * @param array $zones + * * @return array */ public function findAllByZones(array $zones, ?string $scope = null): array { $zones = array_map( fn (ZoneInterface $zone): string => $zone->getCode(), - $zones + $zones, ); $query = $this->createQueryBuilder('z') diff --git a/src/Sylius/Bundle/AddressingBundle/Repository/ZoneRepositoryInterface.php b/src/Sylius/Bundle/AddressingBundle/Repository/ZoneRepositoryInterface.php index c4b86412630d..9c9aad6b9080 100644 --- a/src/Sylius/Bundle/AddressingBundle/Repository/ZoneRepositoryInterface.php +++ b/src/Sylius/Bundle/AddressingBundle/Repository/ZoneRepositoryInterface.php @@ -31,6 +31,7 @@ public function findAllByAddress(AddressInterface $address, ?string $scope = nul /** * @param array $zones + * * @return array */ public function findAllByZones(array $zones, ?string $scope = null): array; diff --git a/src/Sylius/Component/Addressing/Matcher/ZoneMatcher.php b/src/Sylius/Component/Addressing/Matcher/ZoneMatcher.php index 7cd7e05d31d6..75c0dc3ccde3 100644 --- a/src/Sylius/Component/Addressing/Matcher/ZoneMatcher.php +++ b/src/Sylius/Component/Addressing/Matcher/ZoneMatcher.php @@ -42,12 +42,13 @@ public function matchAll(AddressInterface $address, ?string $scope = null): arra return array_filter( $zonesWithParents, - fn (ZoneInterface $zone) => $zone->getScope() === $scope + fn (ZoneInterface $zone) => $zone->getScope() === $scope, ); } /** * @param array $zones + * * @return array */ private function getZonesWithParentZones(array $zones): array