@@ -9,7 +9,7 @@ |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace spec\Sylius\Component\Product\Model; |
15 | 15 |
@@ -35,11 +35,13 @@ |
||
35 | 35 | |
36 | 36 | /** |
37 | 37 | * @param AttributeValueInterface $attribute |
38 | + * @return void |
|
38 | 39 | */ |
39 | 40 | public function addAttribute(AttributeValueInterface $attribute): void; |
40 | 41 | |
41 | 42 | /** |
42 | 43 | * @param AttributeValueInterface $attribute |
44 | + * @return void |
|
43 | 45 | */ |
44 | 46 | public function removeAttribute(AttributeValueInterface $attribute): void; |
45 | 47 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace Sylius\Component\Attribute\Model; |
15 | 15 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | string $localeCode, |
37 | 37 | string $fallbackLocaleCode, |
38 | 38 | ?string $baseLocaleCode = null |
39 | - ): Collection; |
|
39 | + ) : Collection; |
|
40 | 40 | |
41 | 41 | /** |
42 | 42 | * @param AttributeValueInterface $attribute |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | * |
62 | 62 | * @return bool |
63 | 63 | */ |
64 | - public function hasAttributeByCodeAndLocale(string $attributeCode, ?string $localeCode = null): bool; |
|
64 | + public function hasAttributeByCodeAndLocale(string $attributeCode, ?string $localeCode = null) : bool; |
|
65 | 65 | |
66 | 66 | /** |
67 | 67 | * @param string $attributeCode |
@@ -69,5 +69,5 @@ discard block |
||
69 | 69 | * |
70 | 70 | * @return AttributeValueInterface|null |
71 | 71 | */ |
72 | - public function getAttributeByCodeAndLocale(string $attributeCode, ?string $localeCode = null): ?AttributeValueInterface; |
|
72 | + public function getAttributeByCodeAndLocale(string $attributeCode, ?string $localeCode = null) : ?AttributeValueInterface; |
|
73 | 73 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace Sylius\Behat\Context\Setup; |
15 | 15 |
@@ -198,6 +198,7 @@ |
||
198 | 198 | |
199 | 199 | /** |
200 | 200 | * @Given /^(this product) is(?:| also) priced at ("[^"]+") in ("[^"]+" channel)$/ |
201 | + * @param integer $price |
|
201 | 202 | */ |
202 | 203 | public function thisProductIsAlsoPricedAtInChannel(ProductInterface $product, $price, ChannelInterface $channel) |
203 | 204 | { |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace Sylius\Component\Product\Model; |
15 | 15 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | /** |
101 | 101 | * @param string $code |
102 | 102 | */ |
103 | - public function setCode(?string $code): void |
|
103 | + public function setCode(?string $code) : void |
|
104 | 104 | { |
105 | 105 | $this->code = $code; |
106 | 106 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | /** |
117 | 117 | * {@inheritdoc} |
118 | 118 | */ |
119 | - public function setName(?string $name): void |
|
119 | + public function setName(?string $name) : void |
|
120 | 120 | { |
121 | 121 | $this->getTranslation()->setName($name); |
122 | 122 | } |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | /** |
133 | 133 | * {@inheritdoc} |
134 | 134 | */ |
135 | - public function setSlug(?string $slug): void |
|
135 | + public function setSlug(?string $slug) : void |
|
136 | 136 | { |
137 | 137 | $this->getTranslation()->setSlug($slug); |
138 | 138 | } |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | /** |
149 | 149 | * {@inheritdoc} |
150 | 150 | */ |
151 | - public function setDescription(?string $description): void |
|
151 | + public function setDescription(?string $description) : void |
|
152 | 152 | { |
153 | 153 | $this->getTranslation()->setDescription($description); |
154 | 154 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | /** |
165 | 165 | * {@inheritdoc} |
166 | 166 | */ |
167 | - public function setMetaKeywords(?string $metaKeywords): void |
|
167 | + public function setMetaKeywords(?string $metaKeywords) : void |
|
168 | 168 | { |
169 | 169 | $this->getTranslation()->setMetaKeywords($metaKeywords); |
170 | 170 | } |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | /** |
181 | 181 | * {@inheritdoc} |
182 | 182 | */ |
183 | - public function setMetaDescription(?string $metaDescription): void |
|
183 | + public function setMetaDescription(?string $metaDescription) : void |
|
184 | 184 | { |
185 | 185 | $this->getTranslation()->setMetaDescription($metaDescription); |
186 | 186 | } |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | string $localeCode, |
198 | 198 | string $fallbackLocaleCode, |
199 | 199 | ?string $baseLocaleCode = null |
200 | - ): Collection { |
|
200 | + ) : Collection { |
|
201 | 201 | if (null === $baseLocaleCode || $baseLocaleCode === $fallbackLocaleCode) { |
202 | 202 | $baseLocaleCode = $fallbackLocaleCode; |
203 | 203 | $fallbackLocaleCode = null; |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | /** |
221 | 221 | * {@inheritdoc} |
222 | 222 | */ |
223 | - public function addAttribute(?AttributeValueInterface $attribute): void |
|
223 | + public function addAttribute(?AttributeValueInterface $attribute) : void |
|
224 | 224 | { |
225 | 225 | Assert::isInstanceOf( |
226 | 226 | $attribute, |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | /** |
238 | 238 | * {@inheritdoc} |
239 | 239 | */ |
240 | - public function removeAttribute(?AttributeValueInterface $attribute): void |
|
240 | + public function removeAttribute(?AttributeValueInterface $attribute) : void |
|
241 | 241 | { |
242 | 242 | Assert::isInstanceOf( |
243 | 243 | $attribute, |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | /** |
263 | 263 | * {@inheritdoc} |
264 | 264 | */ |
265 | - public function hasAttributeByCodeAndLocale(string $attributeCode, ?string $localeCode = null): bool |
|
265 | + public function hasAttributeByCodeAndLocale(string $attributeCode, ?string $localeCode = null) : bool |
|
266 | 266 | { |
267 | 267 | $localeCode = $localeCode ?: $this->getTranslation()->getLocale(); |
268 | 268 | |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | /** |
280 | 280 | * {@inheritdoc} |
281 | 281 | */ |
282 | - public function getAttributeByCodeAndLocale(string $attributeCode, ?string $localeCode = null): ?AttributeValueInterface |
|
282 | + public function getAttributeByCodeAndLocale(string $attributeCode, ?string $localeCode = null) : ?AttributeValueInterface |
|
283 | 283 | { |
284 | 284 | if (null === $localeCode) { |
285 | 285 | $localeCode = $this->getTranslation()->getLocale(); |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | ProductAttributeValueInterface $attributeValue, |
459 | 459 | string $localeCode, |
460 | 460 | ?string $fallbackLocaleCode = null |
461 | - ): AttributeValueInterface { |
|
461 | + ) : AttributeValueInterface { |
|
462 | 462 | if (!$this->hasNotEmptyAttributeByCodeAndLocale($attributeValue->getCode(), $localeCode)) { |
463 | 463 | if ( |
464 | 464 | null !== $fallbackLocaleCode && |
@@ -462,8 +462,7 @@ |
||
462 | 462 | if (!$this->hasNotEmptyAttributeByCodeAndLocale($attributeValue->getCode(), $localeCode)) { |
463 | 463 | if ( |
464 | 464 | null !== $fallbackLocaleCode && |
465 | - $this->hasNotEmptyAttributeByCodeAndLocale($attributeValue->getCode(), $fallbackLocaleCode)) |
|
466 | - { |
|
465 | + $this->hasNotEmptyAttributeByCodeAndLocale($attributeValue->getCode(), $fallbackLocaleCode)) { |
|
467 | 466 | return $this->getAttributeByCodeAndLocale($attributeValue->getCode(), $fallbackLocaleCode); |
468 | 467 | } |
469 | 468 |