@@ -24,6 +24,7 @@ discard block |
||
24 | 24 | { |
25 | 25 | /** |
26 | 26 | * @throws ElementNotFoundException |
27 | + * @return void |
|
27 | 28 | */ |
28 | 29 | public function addToCart(); |
29 | 30 | |
@@ -31,6 +32,7 @@ discard block |
||
31 | 32 | * @param string $quantity |
32 | 33 | * |
33 | 34 | * @throws ElementNotFoundException |
35 | + * @return void |
|
34 | 36 | */ |
35 | 37 | public function addToCartWithQuantity($quantity); |
36 | 38 | |
@@ -38,6 +40,7 @@ discard block |
||
38 | 40 | * @param string $variant |
39 | 41 | * |
40 | 42 | * @throws ElementNotFoundException |
43 | + * @return void |
|
41 | 44 | */ |
42 | 45 | public function addToCartWithVariant($variant); |
43 | 46 | |
@@ -46,6 +49,7 @@ discard block |
||
46 | 49 | * @param string $optionValue |
47 | 50 | * |
48 | 51 | * @throws ElementNotFoundException |
52 | + * @return void |
|
49 | 53 | */ |
50 | 54 | public function addToCartWithOption(ProductOptionInterface $option, $optionValue); |
51 | 55 | |
@@ -56,6 +60,7 @@ discard block |
||
56 | 60 | |
57 | 61 | /** |
58 | 62 | * @param string $url |
63 | + * @return void |
|
59 | 64 | */ |
60 | 65 | public function visit($url); |
61 | 66 | |
@@ -67,7 +72,7 @@ discard block |
||
67 | 72 | public function getAttributeByName($attributeName); |
68 | 73 | |
69 | 74 | /** |
70 | - * @return array |
|
75 | + * @return \Behat\Mink\Element\NodeElement[] |
|
71 | 76 | */ |
72 | 77 | public function getAttributes(); |
73 | 78 | |
@@ -80,6 +85,7 @@ discard block |
||
80 | 85 | |
81 | 86 | /** |
82 | 87 | * @param int $timeout |
88 | + * @return void |
|
83 | 89 | */ |
84 | 90 | public function waitForValidationErrors($timeout); |
85 | 91 | |
@@ -123,11 +129,13 @@ discard block |
||
123 | 129 | /** |
124 | 130 | * @param string $optionName |
125 | 131 | * @param string $optionValue |
132 | + * @return void |
|
126 | 133 | */ |
127 | 134 | public function selectOption($optionName, $optionValue); |
128 | 135 | |
129 | 136 | /** |
130 | 137 | * @param string $variantName |
138 | + * @return void |
|
131 | 139 | */ |
132 | 140 | public function selectVariant($variantName); |
133 | 141 |
@@ -23,7 +23,6 @@ |
||
23 | 23 | use Sylius\Component\Order\Modifier\OrderModifierInterface; |
24 | 24 | use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
25 | 25 | use Symfony\Component\Form\FormFactoryInterface; |
26 | -use Symfony\Component\HttpFoundation\JsonResponse; |
|
27 | 26 | use Symfony\Component\HttpFoundation\RedirectResponse; |
28 | 27 | use Symfony\Component\HttpFoundation\Request; |
29 | 28 | use Symfony\Component\HttpFoundation\Response; |
@@ -36,11 +36,13 @@ discard block |
||
36 | 36 | |
37 | 37 | /** |
38 | 38 | * @param string $locale |
39 | + * @return void |
|
39 | 40 | */ |
40 | 41 | public function setCurrentLocale($locale); |
41 | 42 | |
42 | 43 | /** |
43 | 44 | * @param string $locale |
45 | + * @return void |
|
44 | 46 | */ |
45 | 47 | public function setFallbackLocale($locale); |
46 | 48 | |
@@ -51,11 +53,13 @@ discard block |
||
51 | 53 | |
52 | 54 | /** |
53 | 55 | * @param TranslationInterface $translation |
56 | + * @return void |
|
54 | 57 | */ |
55 | 58 | public function addTranslation(TranslationInterface $translation); |
56 | 59 | |
57 | 60 | /** |
58 | 61 | * @param TranslationInterface $translation |
62 | + * @return void |
|
59 | 63 | */ |
60 | 64 | public function removeTranslation(TranslationInterface $translation); |
61 | 65 | } |
@@ -32,16 +32,19 @@ discard block |
||
32 | 32 | |
33 | 33 | /** |
34 | 34 | * @param Collection $variants |
35 | + * @return void |
|
35 | 36 | */ |
36 | 37 | public function setVariants(Collection $variants); |
37 | 38 | |
38 | 39 | /** |
39 | 40 | * @param VariantInterface $variant |
41 | + * @return void |
|
40 | 42 | */ |
41 | 43 | public function addVariant(VariantInterface $variant); |
42 | 44 | |
43 | 45 | /** |
44 | 46 | * @param VariantInterface $variant |
47 | + * @return void |
|
45 | 48 | */ |
46 | 49 | public function removeVariant(VariantInterface $variant); |
47 | 50 | |
@@ -64,16 +67,19 @@ discard block |
||
64 | 67 | |
65 | 68 | /** |
66 | 69 | * @param Collection $options |
70 | + * @return void |
|
67 | 71 | */ |
68 | 72 | public function setOptions(Collection $options); |
69 | 73 | |
70 | 74 | /** |
71 | 75 | * @param OptionInterface $option |
76 | + * @return void |
|
72 | 77 | */ |
73 | 78 | public function addOption(OptionInterface $option); |
74 | 79 | |
75 | 80 | /** |
76 | 81 | * @param OptionInterface $option |
82 | + * @return void |
|
77 | 83 | */ |
78 | 84 | public function removeOption(OptionInterface $option); |
79 | 85 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $this->shouldImplement(FormTypeInterface::class); |
41 | 41 | } |
42 | 42 | |
43 | - function it_adds_add_code_event_subscriber(FormBuilder $builder) |
|
43 | + function it_adds_add_code_event_subscriber(FormBuilder $builder) |
|
44 | 44 | { |
45 | 45 | $builder->add(Argument::any(), Argument::cetera())->willReturn($builder); |
46 | 46 |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function storeAllowsPaying($paymentMethodName, $position = null) |
90 | 90 | { |
91 | - $this->createPaymentMethod($paymentMethodName, 'PM_'.$paymentMethodName, 'Payment method', true, $position); |
|
91 | + $this->createPaymentMethod($paymentMethodName, 'PM_' . $paymentMethodName, 'Payment method', true, $position); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public function theStoreHasPaymentMethodNotAssignedToAnyChannel($paymentMethodName) |
142 | 142 | { |
143 | - $this->createPaymentMethod($paymentMethodName, 'PM_'.$paymentMethodName, 'Payment method', false); |
|
143 | + $this->createPaymentMethod($paymentMethodName, 'PM_' . $paymentMethodName, 'Payment method', false); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | { |
181 | 181 | $product = $this->createProduct($productName, $price); |
182 | 182 | |
183 | - $product->setDescription('Awesome '.$productName); |
|
183 | + $product->setDescription('Awesome ' . $productName); |
|
184 | 184 | |
185 | 185 | if ($this->sharedStorage->has('channel')) { |
186 | 186 | $product->addChannel($this->sharedStorage->get('channel')); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | { |
214 | 214 | $product = $this->createProduct($productName, $price); |
215 | 215 | |
216 | - $product->setDescription('Awesome '.$productName); |
|
216 | + $product->setDescription('Awesome ' . $productName); |
|
217 | 217 | |
218 | 218 | foreach ($channels as $channel) { |
219 | 219 | $product->addChannel($channel); |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | $product->setCode(StringInflector::nameToUppercaseCode($productName)); |
252 | 252 | $product->setSlug($this->slugGenerator->generate($productName)); |
253 | 253 | |
254 | - $product->setDescription('Awesome '.$productName); |
|
254 | + $product->setDescription('Awesome ' . $productName); |
|
255 | 255 | |
256 | 256 | if ($this->sharedStorage->has('channel')) { |
257 | 257 | $channel = $this->sharedStorage->get('channel'); |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | */ |
374 | 374 | public function thisProductHasAttributeWithValue(ProductInterface $product, $productAttributeType, $productAttributeName, $value) |
375 | 375 | { |
376 | - $attribute = $this->createProductAttribute($productAttributeType,$productAttributeName); |
|
376 | + $attribute = $this->createProductAttribute($productAttributeType, $productAttributeName); |
|
377 | 377 | $attributeValue = $this->createProductAttributeValue($value, $attribute); |
378 | 378 | $product->addAttribute($attributeValue); |
379 | 379 | |
@@ -385,8 +385,8 @@ discard block |
||
385 | 385 | */ |
386 | 386 | public function thisProductHasPercentAttributeWithValue(ProductInterface $product, $productAttributeName, $value) |
387 | 387 | { |
388 | - $attribute = $this->createProductAttribute('percent',$productAttributeName); |
|
389 | - $attributeValue = $this->createProductAttributeValue($value/100, $attribute); |
|
388 | + $attribute = $this->createProductAttribute('percent', $productAttributeName); |
|
389 | + $attributeValue = $this->createProductAttributeValue($value / 100, $attribute); |
|
390 | 390 | $product->addAttribute($attributeValue); |
391 | 391 | |
392 | 392 | $this->objectManager->flush(); |
@@ -410,9 +410,9 @@ discard block |
||
410 | 410 | */ |
411 | 411 | public function thisProductHasPercentAttributeWithValueAtPosition(ProductInterface $product, $productAttributeName, $position) |
412 | 412 | { |
413 | - $attribute = $this->createProductAttribute('percent',$productAttributeName); |
|
413 | + $attribute = $this->createProductAttribute('percent', $productAttributeName); |
|
414 | 414 | $attribute->setPosition($position); |
415 | - $attributeValue = $this->createProductAttributeValue(rand(1,100)/100, $attribute); |
|
415 | + $attributeValue = $this->createProductAttributeValue(rand(1, 100) / 100, $attribute); |
|
416 | 416 | |
417 | 417 | $product->addAttribute($attributeValue); |
418 | 418 | |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | |
584 | 584 | /** @var ImageInterface $productImage */ |
585 | 585 | $productImage = $this->productImageFactory->createNew(); |
586 | - $productImage->setFile(new UploadedFile($filesPath.$imagePath, basename($imagePath))); |
|
586 | + $productImage->setFile(new UploadedFile($filesPath . $imagePath, basename($imagePath))); |
|
587 | 587 | $productImage->setCode($imageCode); |
588 | 588 | $this->imageUploader->upload($productImage); |
589 | 589 |
@@ -100,25 +100,25 @@ |
||
100 | 100 | /** |
101 | 101 | * {@inheritdoc} |
102 | 102 | */ |
103 | - public function isNextStepButtonUnavailable() |
|
104 | - { |
|
105 | - return $this->getElement('next_step')->hasClass('disabled'); |
|
106 | - } |
|
103 | + public function isNextStepButtonUnavailable() |
|
104 | + { |
|
105 | + return $this->getElement('next_step')->hasClass('disabled'); |
|
106 | + } |
|
107 | 107 | |
108 | 108 | /** |
109 | 109 | * {@inheritdoc} |
110 | 110 | */ |
111 | - public function getPaymentMethods() |
|
112 | - { |
|
113 | - $inputs = $this->getSession()->getPage()->findAll('css', '#payment_methods .item .content label'); |
|
111 | + public function getPaymentMethods() |
|
112 | + { |
|
113 | + $inputs = $this->getSession()->getPage()->findAll('css', '#payment_methods .item .content label'); |
|
114 | 114 | |
115 | - $paymentMethods = []; |
|
116 | - foreach ($inputs as $input) { |
|
117 | - $paymentMethods[] = trim($input->getText()); |
|
118 | - } |
|
115 | + $paymentMethods = []; |
|
116 | + foreach ($inputs as $input) { |
|
117 | + $paymentMethods[] = trim($input->getText()); |
|
118 | + } |
|
119 | 119 | |
120 | - return $paymentMethods; |
|
121 | - } |
|
120 | + return $paymentMethods; |
|
121 | + } |
|
122 | 122 | |
123 | 123 | /** |
124 | 124 | * {@inheritdoc} |