@@ -17,7 +17,7 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public function load(array $configs, ContainerBuilder $container): void |
| 19 | 19 | { |
| 20 | - $this->processConfiguration($this->getConfiguration([], $container), $configs); |
|
| 20 | + $this->processConfiguration($this->getConfiguration([ ], $container), $configs); |
|
| 21 | 21 | |
| 22 | 22 | $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
| 23 | 23 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | ChannelInterface $channel, |
| 25 | 25 | VendorInterface $vendor, |
| 26 | 26 | string $locale, |
| 27 | - array $sorting = [] |
|
| 27 | + array $sorting = [ ] |
|
| 28 | 28 | ): QueryBuilder { |
| 29 | 29 | $queryBuilder = $this->createQueryBuilder('o') |
| 30 | 30 | ->distinct() |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | ->setParameter('vendor', $vendor) |
| 43 | 43 | ; |
| 44 | 44 | |
| 45 | - if (isset($sorting['price'])) { |
|
| 45 | + if (isset($sorting[ 'price' ])) { |
|
| 46 | 46 | $subQuery = $this->createQueryBuilder('m') |
| 47 | 47 | ->select('min(v.position)') |
| 48 | 48 | ->innerJoin('m.variants', 'v') |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function createShopListQueryBuilder( |
| 20 | 20 | ChannelInterface $channel, |
| 21 | - array $sorting = [] |
|
| 21 | + array $sorting = [ ] |
|
| 22 | 22 | ): QueryBuilder; |
| 23 | 23 | |
| 24 | 24 | /** |
@@ -22,6 +22,6 @@ |
||
| 22 | 22 | ChannelInterface $channel, |
| 23 | 23 | VendorInterface $vendor, |
| 24 | 24 | string $locale, |
| 25 | - array $sorting = [] |
|
| 25 | + array $sorting = [ ] |
|
| 26 | 26 | ): QueryBuilder; |
| 27 | 27 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function createShopListQueryBuilder( |
| 18 | 18 | ChannelInterface $channel, |
| 19 | - array $sorting = [] |
|
| 19 | + array $sorting = [ ] |
|
| 20 | 20 | ): QueryBuilder { |
| 21 | 21 | return $this->findByEnabledQueryBuilder($channel); |
| 22 | 22 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | private function shouldProductsPositionsBeUpdated(Request $request, ?array $vendors): bool |
| 74 | 74 | { |
| 75 | - return in_array($request->getMethod(), ['POST', 'PUT', 'PATCH'], true) && null !== $vendors; |
|
| 75 | + return in_array($request->getMethod(), [ 'POST', 'PUT', 'PATCH' ], true) && null !== $vendors; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | Assert::numeric($position, sprintf('The position "%s" is invalid.', $position)); |
| 85 | 85 | |
| 86 | 86 | /** @var VendorInterface $vendorFromBase */ |
| 87 | - $vendorFromBase = $this->repository->findOneBy(['id' => $id]); |
|
| 87 | + $vendorFromBase = $this->repository->findOneBy([ 'id' => $id ]); |
|
| 88 | 88 | $vendorFromBase->setPosition((int) $position); |
| 89 | 89 | } |
| 90 | 90 | } |
@@ -67,10 +67,10 @@ discard block |
||
| 67 | 67 | public function generate(ChannelInterface $channel): iterable |
| 68 | 68 | { |
| 69 | 69 | $this->channel = $channel; |
| 70 | - $urls = []; |
|
| 70 | + $urls = [ ]; |
|
| 71 | 71 | |
| 72 | 72 | foreach ($this->getVendors() as $vendor) { |
| 73 | - $urls[] = $this->createVendorUrl($vendor); |
|
| 73 | + $urls[ ] = $this->createVendorUrl($vendor); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | return $urls; |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | private function getTranslations(VendorInterface $vendor): Collection |
| 86 | 86 | { |
| 87 | - return $vendor->getTranslations()->filter(function (TranslationInterface $translation): bool { |
|
| 87 | + return $vendor->getTranslations()->filter(function(TranslationInterface $translation): bool { |
|
| 88 | 88 | return $this->localeInLocaleCodes($translation); |
| 89 | 89 | }); |
| 90 | 90 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | private function getLocaleCodes(): array |
| 113 | 113 | { |
| 114 | - return $this->channel->getLocales()->map(function (LocaleInterface $locale): ?string { |
|
| 114 | + return $this->channel->getLocales()->map(function(LocaleInterface $locale): ?string { |
|
| 115 | 115 | return $locale->getCode(); |
| 116 | 116 | })->toArray(); |
| 117 | 117 | } |