@@ -151,6 +151,9 @@ |
||
151 | 151 | $this->validate($address, $constraint); |
152 | 152 | } |
153 | 153 | |
154 | + /** |
|
155 | + * @param string $propertyPath |
|
156 | + */ |
|
154 | 157 | private function createViolation($propertyPath) |
155 | 158 | { |
156 | 159 | return new ConstraintViolation('message', 'template', [], 'root', $propertyPath, 'invalidValue'); |
@@ -71,6 +71,9 @@ |
||
71 | 71 | $this->validate($address, $constraint); |
72 | 72 | } |
73 | 73 | |
74 | + /** |
|
75 | + * @param string $propertyPath |
|
76 | + */ |
|
74 | 77 | private function createViolation($propertyPath) |
75 | 78 | { |
76 | 79 | return new ConstraintViolation('message', 'template', [], 'root', $propertyPath, 'invalidValue'); |
@@ -43,7 +43,7 @@ |
||
43 | 43 | /** |
44 | 44 | * @param Request $request |
45 | 45 | * |
46 | - * @return Response |
|
46 | + * @return \Symfony\Component\HttpFoundation\Response |
|
47 | 47 | */ |
48 | 48 | public function indexAction(Request $request) |
49 | 49 | { |
@@ -119,7 +119,7 @@ |
||
119 | 119 | /** |
120 | 120 | * @param array $config |
121 | 121 | * |
122 | - * @return array |
|
122 | + * @return ContainerBuilder |
|
123 | 123 | */ |
124 | 124 | private function defineDefaultOrmRepository(array $config) |
125 | 125 | { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | public function load(array $config, ContainerBuilder $container) |
35 | 35 | { |
36 | 36 | $config = $this->processConfiguration($this->getConfiguration($config, $container), $config); |
37 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
37 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
38 | 38 | |
39 | 39 | if (SyliusResourceBundle::DRIVER_DOCTRINE_ORM === $config['driver']) { |
40 | 40 | $config = $this->defineDefaultOrmRepository($config); |
@@ -48,11 +48,11 @@ discard block |
||
48 | 48 | continue; |
49 | 49 | } |
50 | 50 | |
51 | - $formDefinition = $container->getDefinition('sylius.form.type.'.$subjectName.'_'.$resourceName); |
|
51 | + $formDefinition = $container->getDefinition('sylius.form.type.' . $subjectName . '_' . $resourceName); |
|
52 | 52 | $formDefinition->addArgument($subjectName); |
53 | 53 | |
54 | 54 | if (isset($resourceConfig['translation'])) { |
55 | - $formTranslationDefinition = $container->getDefinition('sylius.form.type.'.$subjectName.'_'.$resourceName.'_translation'); |
|
55 | + $formTranslationDefinition = $container->getDefinition('sylius.form.type.' . $subjectName . '_' . $resourceName . '_translation'); |
|
56 | 56 | $formTranslationDefinition->addArgument($subjectName); |
57 | 57 | } |
58 | 58 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | |
93 | 93 | foreach ($subjectConfig as $resourceName => $resourceConfig) { |
94 | 94 | if (is_array($resourceConfig)) { |
95 | - $resolvedResources[$subjectName.'_'.$resourceName] = $resourceConfig; |
|
95 | + $resolvedResources[$subjectName . '_' . $resourceName] = $resourceConfig; |
|
96 | 96 | } |
97 | 97 | } |
98 | 98 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | ->setArguments([new Reference(sprintf('sylius.factory.%s_attribute_value', $subjectName))]) |
114 | 114 | ; |
115 | 115 | |
116 | - $container->setDefinition('sylius.builder.'.$subjectName.'_archetype', $builderDefinition); |
|
116 | + $container->setDefinition('sylius.builder.' . $subjectName . '_archetype', $builderDefinition); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
@@ -39,7 +39,7 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
42 | - * @return array |
|
42 | + * @return string[] |
|
43 | 43 | */ |
44 | 44 | public function getSubscribedEvents() |
45 | 45 | { |
@@ -34,7 +34,7 @@ |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
37 | - * @return array |
|
37 | + * @return string[] |
|
38 | 38 | */ |
39 | 39 | public function getSubscribedEvents() |
40 | 40 | { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | 'targetEntity' => $associationEntity, |
83 | 83 | 'inversedBy' => 'associations', |
84 | 84 | 'joinColumns' => [[ |
85 | - 'name' => $subject.'_id', |
|
85 | + 'name' => $subject . '_id', |
|
86 | 86 | 'referencedColumnName' => $associationEntityMetadata->fieldMappings['id']['columnName'], |
87 | 87 | 'nullable' => false, |
88 | 88 | 'onDelete' => 'CASCADE', |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | 'onDelete' => 'CASCADE', |
113 | 113 | ]], |
114 | 114 | 'inverseJoinColumns' => [[ |
115 | - 'name' => $subject.'_id', |
|
115 | + 'name' => $subject . '_id', |
|
116 | 116 | 'referencedColumnName' => $associationEntityMetadata->fieldMappings['id']['columnName'], |
117 | 117 | 'nullable' => false, |
118 | 118 | 'unique' => false, |
@@ -40,7 +40,7 @@ |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
43 | - * @return array |
|
43 | + * @return string[] |
|
44 | 44 | */ |
45 | 45 | public function getSubscribedEvents() |
46 | 46 | { |
@@ -87,7 +87,7 @@ |
||
87 | 87 | 'targetEntity' => $subjectClass, |
88 | 88 | 'inversedBy' => 'attributes', |
89 | 89 | 'joinColumns' => [[ |
90 | - 'name' => $subject.'_id', |
|
90 | + 'name' => $subject . '_id', |
|
91 | 91 | 'referencedColumnName' => $targetEntityMetadata->fieldMappings['id']['columnName'], |
92 | 92 | 'nullable' => false, |
93 | 93 | 'onDelete' => 'CASCADE', |
@@ -83,7 +83,6 @@ discard block |
||
83 | 83 | /** |
84 | 84 | * Redirect to specific URL or to cart. |
85 | 85 | * |
86 | - * @param Request $request |
|
87 | 86 | * |
88 | 87 | * @return RedirectResponse |
89 | 88 | */ |
@@ -105,7 +104,6 @@ discard block |
||
105 | 104 | * If the item is found and the current user cart contains that item, |
106 | 105 | * it will be removed and the cart - refreshed and saved. |
107 | 106 | * |
108 | - * @param mixed $id |
|
109 | 107 | * |
110 | 108 | * @return Response |
111 | 109 | */ |
@@ -14,13 +14,13 @@ |
||
14 | 14 | use Doctrine\Common\Collections\Collection; |
15 | 15 | use Doctrine\Common\Persistence\ObjectManager; |
16 | 16 | use PhpSpec\ObjectBehavior; |
17 | -use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface; |
|
18 | 17 | use Sylius\Component\Cart\Event\CartEvent; |
19 | 18 | use Sylius\Component\Cart\Event\CartItemEvent; |
20 | 19 | use Sylius\Component\Cart\Model\CartInterface; |
21 | 20 | use Sylius\Component\Cart\Model\CartItemInterface; |
22 | 21 | use Sylius\Component\Cart\Provider\CartProviderInterface; |
23 | 22 | use Sylius\Component\Order\Model\OrderItemInterface; |
23 | +use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface; |
|
24 | 24 | use Symfony\Component\Validator\ConstraintViolationListInterface; |
25 | 25 | use Symfony\Component\Validator\Validator\ValidatorInterface; |
26 | 26 |