@@ -72,6 +72,9 @@ |
||
72 | 72 | Assert::oneOf($localeCode, $supportedLocaleCodes); |
73 | 73 | } |
74 | 74 | |
75 | + /** |
|
76 | + * @param string $channelCode |
|
77 | + */ |
|
75 | 78 | private function getChannel(?string $channelCode): ChannelInterface |
76 | 79 | { |
77 | 80 | /** @var ChannelInterface $channel */ |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $this->productViewFactory = $productViewFactory; |
34 | 34 | } |
35 | 35 | |
36 | - public function findOneBySlug(string $channelCode, string $productSlug, ?string $localeCode): ProductView |
|
36 | + public function findOneBySlug(string $channelCode, string $productSlug, ? string $localeCode) : ProductView |
|
37 | 37 | { |
38 | 38 | $channel = $this->getChannel($channelCode); |
39 | 39 | $localeCode = $this->getLocaleCode($localeCode, $channel); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | return $this->productViewFactory->create($product, $channel, $localeCode); |
46 | 46 | } |
47 | 47 | |
48 | - public function findOneByCode(string $channelCode, string $productCode, ?string $localeCode): ProductView |
|
48 | + public function findOneByCode(string $channelCode, string $productCode, ? string $localeCode) : ProductView |
|
49 | 49 | { |
50 | 50 | $channel = $this->getChannel($channelCode); |
51 | 51 | $localeCode = $this->getLocaleCode($localeCode, $channel); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | Assert::oneOf($localeCode, $supportedLocaleCodes); |
73 | 73 | } |
74 | 74 | |
75 | - private function getChannel(?string $channelCode): ChannelInterface |
|
75 | + private function getChannel(? string $channelCode) : ChannelInterface |
|
76 | 76 | { |
77 | 77 | /** @var ChannelInterface $channel */ |
78 | 78 | $channel = $this->channelRepository->findOneByCode($channelCode); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | return $channel; |
83 | 83 | } |
84 | 84 | |
85 | - private function getLocaleCode(?string $localeCode, ChannelInterface $channel): string |
|
85 | + private function getLocaleCode(? string $localeCode, ChannelInterface $channel) : string |
|
86 | 86 | { |
87 | 87 | $localeCode = $localeCode ?? $channel->getDefaultLocale()->getCode(); |
88 | 88 | $this->assertLocaleSupport($localeCode, $channel->getLocales()); |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | interface ProductDetailsQueryInterface |
10 | 10 | { |
11 | - public function findOneBySlug(string $channelCode, string $productSlug, ?string $localeCode): ProductView; |
|
11 | + public function findOneBySlug(string $channelCode, string $productSlug, ? string $localeCode) : ProductView; |
|
12 | 12 | |
13 | - public function findOneByCode(string $channelCode, string $productCode, ?string $localeCode): ProductView; |
|
13 | + public function findOneByCode(string $channelCode, string $productCode, ? string $localeCode) : ProductView; |
|
14 | 14 | } |
@@ -72,6 +72,9 @@ |
||
72 | 72 | Assert::oneOf($localeCode, $supportedLocaleCodes); |
73 | 73 | } |
74 | 74 | |
75 | + /** |
|
76 | + * @param string $channelCode |
|
77 | + */ |
|
75 | 78 | private function getChannel(?string $channelCode): ChannelInterface |
76 | 79 | { |
77 | 80 | /** @var ChannelInterface $channel */ |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $this->pageViewFactory = $pageViewFactory; |
50 | 50 | } |
51 | 51 | |
52 | - public function findByTaxonSlug(string $taxonSlug, ?string $localeCode, string $channelCode, PaginatorDetails $paginatorDetails): PageView |
|
52 | + public function findByTaxonSlug(string $taxonSlug, ? string $localeCode, string $channelCode, PaginatorDetails $paginatorDetails) : PageView |
|
53 | 53 | { |
54 | 54 | $channel = $this->getChannel($channelCode); |
55 | 55 | $localeCode = $this->getLocaleCode($localeCode, $channel); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | ); |
69 | 69 | } |
70 | 70 | |
71 | - public function findByTaxonCode(string $taxonCode, ?string $localeCode, string $channelCode, PaginatorDetails $paginatorDetails): PageView |
|
71 | + public function findByTaxonCode(string $taxonCode, ? string $localeCode, string $channelCode, PaginatorDetails $paginatorDetails) : PageView |
|
72 | 72 | { |
73 | 73 | $channel = $this->getChannel($channelCode); |
74 | 74 | $localeCode = $this->getLocaleCode($localeCode, $channel); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | Assert::oneOf($localeCode, $supportedLocaleCodes); |
102 | 102 | } |
103 | 103 | |
104 | - private function getChannel(?string $channelCode): ChannelInterface |
|
104 | + private function getChannel(? string $channelCode) : ChannelInterface |
|
105 | 105 | { |
106 | 106 | /** @var ChannelInterface $channel */ |
107 | 107 | $channel = $this->channelRepository->findOneByCode($channelCode); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | return $channel; |
112 | 112 | } |
113 | 113 | |
114 | - private function getLocaleCode(?string $localeCode, ChannelInterface $channel): string |
|
114 | + private function getLocaleCode(? string $localeCode, ChannelInterface $channel) : string |
|
115 | 115 | { |
116 | 116 | $localeCode = $localeCode ?? $channel->getDefaultLocale()->getCode(); |
117 | 117 | $this->assertLocaleSupport($localeCode, $channel->getLocales()); |
@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | interface ProductCatalogQueryInterface |
9 | 9 | { |
10 | - public function findByTaxonSlug(string $taxonSlug, ? $localeCode, string $channelCode, PaginatorDetails $paginatorDetails): PageView; |
|
10 | + public function findByTaxonSlug(string $taxonSlug, ? $localeCode, string $channelCode, PaginatorDetails $paginatorDetails) : PageView; |
|
11 | 11 | |
12 | - public function findByTaxonCode(string $taxonCode, ? $localeCode, string $channelCode, PaginatorDetails $paginatorDetails): PageView; |
|
12 | + public function findByTaxonCode(string $taxonCode, ? $localeCode, string $channelCode, PaginatorDetails $paginatorDetails) : PageView; |
|
13 | 13 | } |