@@ -27,6 +27,7 @@ |
||
27 | 27 | |
28 | 28 | /** |
29 | 29 | * @param string $value |
30 | + * @return void |
|
30 | 31 | */ |
31 | 32 | public function setValue($value); |
32 | 33 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | /** |
31 | 31 | * @param Request $request |
32 | - * @return \Symfony\Component\HttpFoundation\RedirectResponse |
|
32 | + * @return JsonResponse |
|
33 | 33 | */ |
34 | 34 | public function updatePositionsAction(Request $request) |
35 | 35 | { |
@@ -11,7 +11,6 @@ |
||
11 | 11 | |
12 | 12 | namespace Sylius\Bundle\CoreBundle\Controller; |
13 | 13 | |
14 | -use Sylius\Bundle\ResourceBundle\Controller\RedirectHandlerInterface; |
|
15 | 14 | use Sylius\Bundle\ResourceBundle\Controller\ResourceController; |
16 | 15 | use Sylius\Component\Core\Model\ProductTaxonInterface; |
17 | 16 | use Sylius\Component\Resource\ResourceActions; |
@@ -38,9 +38,9 @@ |
||
38 | 38 | $productTaxons = $request->get('productTaxons'); |
39 | 39 | |
40 | 40 | if (in_array($request->getMethod(), ['POST', 'PUT', 'PATCH']) && null !== $productTaxons) { |
41 | - foreach($productTaxons as $productTaxon) { |
|
41 | + foreach ($productTaxons as $productTaxon) { |
|
42 | 42 | |
43 | - if(!is_numeric($productTaxon['position'])) { |
|
43 | + if (!is_numeric($productTaxon['position'])) { |
|
44 | 44 | throw new HttpException( |
45 | 45 | Response::HTTP_NOT_ACCEPTABLE, |
46 | 46 | sprintf('The productTaxon position "%s" is invalid.', $productTaxon['position']) |
@@ -14,11 +14,9 @@ |
||
14 | 14 | use Doctrine\Common\Collections\ArrayCollection; |
15 | 15 | use Doctrine\Common\Collections\Collection; |
16 | 16 | use PhpSpec\ObjectBehavior; |
17 | -use Prophecy\Argument; |
|
18 | 17 | use Sylius\Bundle\CoreBundle\Form\DataTransformer\ProductTaxonCollectionToTaxonCollectionTransformer; |
19 | 18 | use Sylius\Component\Core\Model\ProductTaxonInterface; |
20 | 19 | use Sylius\Component\Core\Model\TaxonInterface; |
21 | -use Sylius\Component\Product\Model\ProductInterface; |
|
22 | 20 | use Sylius\Component\Resource\Exception\UnexpectedTypeException; |
23 | 21 | use Sylius\Component\Resource\Factory\FactoryInterface; |
24 | 22 | use Symfony\Component\Form\DataTransformerInterface; |
@@ -39,6 +39,7 @@ discard block |
||
39 | 39 | * Sets all option values. |
40 | 40 | * |
41 | 41 | * @param Collection $optionValues |
42 | + * @return void |
|
42 | 43 | */ |
43 | 44 | public function setValues(Collection $optionValues); |
44 | 45 | |
@@ -46,6 +47,7 @@ discard block |
||
46 | 47 | * Adds option value. |
47 | 48 | * |
48 | 49 | * @param OptionValueInterface $optionValue |
50 | + * @return void |
|
49 | 51 | */ |
50 | 52 | public function addValue(OptionValueInterface $optionValue); |
51 | 53 | |
@@ -53,6 +55,7 @@ discard block |
||
53 | 55 | * Removes option value. |
54 | 56 | * |
55 | 57 | * @param OptionValueInterface $optionValue |
58 | + * @return void |
|
56 | 59 | */ |
57 | 60 | public function removeValue(OptionValueInterface $optionValue); |
58 | 61 |
@@ -27,6 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | /** |
29 | 29 | * @param OptionInterface $option |
30 | + * @return void |
|
30 | 31 | */ |
31 | 32 | public function setOption(OptionInterface $option = null); |
32 | 33 | |
@@ -41,6 +42,7 @@ discard block |
||
41 | 42 | * Set internal value. |
42 | 43 | * |
43 | 44 | * @param string $value |
45 | + * @return void |
|
44 | 46 | */ |
45 | 47 | public function setValue($value); |
46 | 48 |
@@ -27,6 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | /** |
29 | 29 | * @param OptionInterface $option |
30 | + * @return void |
|
30 | 31 | */ |
31 | 32 | public function setOption(OptionInterface $option = null); |
32 | 33 | |
@@ -41,6 +42,7 @@ discard block |
||
41 | 42 | * Set internal value. |
42 | 43 | * |
43 | 44 | * @param string $value |
45 | + * @return void |
|
44 | 46 | */ |
45 | 47 | public function setValue($value); |
46 | 48 |
@@ -98,7 +98,7 @@ |
||
98 | 98 | ->scalarNode('factory')->defaultValue(Factory::class)->end() |
99 | 99 | ->end() |
100 | 100 | ->end() |
101 | - ->end() |
|
101 | + ->end() |
|
102 | 102 | ->end() |
103 | 103 | ->end() |
104 | 104 | ->end() |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function transform($productTaxonCollection) |
42 | 42 | { |
43 | - if(null === $productTaxonCollection) { |
|
43 | + if (null === $productTaxonCollection) { |
|
44 | 44 | return new ArrayCollection(); |
45 | 45 | } |
46 | 46 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function reverseTransform($taxonCollection) |
64 | 64 | { |
65 | - if(null === $taxonCollection) { |
|
65 | + if (null === $taxonCollection) { |
|
66 | 66 | return new ArrayCollection(); |
67 | 67 | } |
68 | 68 |
@@ -24,7 +24,8 @@ |
||
24 | 24 | |
25 | 25 | final class UniqueSimpleProductCodeValidatorSpec extends ObjectBehavior |
26 | 26 | { |
27 | - function let(ExecutionContextInterface $context, ProductVariantRepositoryInterface $productVariantRepository) { |
|
27 | + function let(ExecutionContextInterface $context, ProductVariantRepositoryInterface $productVariantRepository) |
|
28 | + { |
|
28 | 29 | $this->beConstructedWith($productVariantRepository); |
29 | 30 | $this->initialize($context); |
30 | 31 | } |