@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
96 | - * @param $code |
|
96 | + * @param string $code |
|
97 | 97 | * |
98 | 98 | * @return null|string |
99 | 99 | */ |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
106 | - * @return array |
|
106 | + * @return string[] |
|
107 | 107 | */ |
108 | 108 | private function getAvailableCountries() |
109 | 109 | { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | public function theStoreHasAndShippingCategory($firstShippingCategoryName, $secondShippingCategoryName = null) |
70 | 70 | { |
71 | 71 | $this->createShippingCategory($firstShippingCategoryName); |
72 | - (null === $secondShippingCategoryName)? : $this->createShippingCategory($secondShippingCategoryName); |
|
72 | + (null === $secondShippingCategoryName) ?: $this->createShippingCategory($secondShippingCategoryName); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | private function createShippingCategory($shippingCategoryName) |
79 | 79 | { |
80 | 80 | /** @var ShippingCategoryInterface $shippingCategory */ |
81 | - $shippingCategory = $this->shippingCategoryFactory->createNew(); |
|
81 | + $shippingCategory = $this->shippingCategoryFactory->createNew(); |
|
82 | 82 | $shippingCategory->setName($shippingCategoryName); |
83 | 83 | $shippingCategory->setCode(StringInflector::nameToCode($shippingCategoryName)); |
84 | 84 |
@@ -11,7 +11,6 @@ |
||
11 | 11 | |
12 | 12 | namespace Sylius\Bundle\LocaleBundle\DependencyInjection; |
13 | 13 | |
14 | -use Sylius\Bundle\LocaleBundle\Form\Type\LocaleChoiceType; |
|
15 | 14 | use Sylius\Bundle\LocaleBundle\Form\Type\LocaleType; |
16 | 15 | use Sylius\Bundle\ResourceBundle\Controller\ResourceController; |
17 | 16 | use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; |
@@ -15,6 +15,7 @@ discard block |
||
15 | 15 | use Behat\Gherkin\Node\TableNode; |
16 | 16 | use Behat\Mink\Element\NodeElement; |
17 | 17 | use Doctrine\Common\Persistence\ObjectManager; |
18 | +use Sylius\Behat\Service\SharedStorageInterface; |
|
18 | 19 | use Sylius\Component\Attribute\Factory\AttributeFactoryInterface; |
19 | 20 | use Sylius\Component\Core\Formatter\StringInflector; |
20 | 21 | use Sylius\Component\Core\Model\ChannelInterface; |
@@ -24,7 +25,6 @@ discard block |
||
24 | 25 | use Sylius\Component\Core\Model\ProductVariantInterface; |
25 | 26 | use Sylius\Component\Core\Pricing\Calculators; |
26 | 27 | use Sylius\Component\Core\Repository\ProductRepositoryInterface; |
27 | -use Sylius\Behat\Service\SharedStorageInterface; |
|
28 | 28 | use Sylius\Component\Core\Uploader\ImageUploaderInterface; |
29 | 29 | use Sylius\Component\Product\Factory\ProductFactoryInterface; |
30 | 30 | use Sylius\Component\Product\Generator\SlugGeneratorInterface; |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | use Sylius\Component\Product\Model\ProductAttributeValueInterface; |
33 | 33 | use Sylius\Component\Product\Model\ProductOptionInterface; |
34 | 34 | use Sylius\Component\Product\Model\ProductOptionValueInterface; |
35 | +use Sylius\Component\Product\Resolver\ProductVariantResolverInterface; |
|
35 | 36 | use Sylius\Component\Resource\Factory\FactoryInterface; |
36 | -use Sylius\Component\Shipping\Model\ShippingCategoryInterface; |
|
37 | 37 | use Sylius\Component\Resource\Model\TranslationInterface; |
38 | +use Sylius\Component\Shipping\Model\ShippingCategoryInterface; |
|
38 | 39 | use Sylius\Component\Taxation\Model\TaxCategoryInterface; |
39 | -use Sylius\Component\Product\Resolver\ProductVariantResolverInterface; |
|
40 | 40 | use Symfony\Component\HttpFoundation\File\UploadedFile; |
41 | 41 | |
42 | 42 | /** |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | $channel = $this->sharedStorage->get('channel'); |
196 | 196 | } |
197 | 197 | $product = $this->createProduct($productName, $price, null, $channel); |
198 | - $product->setDescription('Awesome '.$productName); |
|
198 | + $product->setDescription('Awesome ' . $productName); |
|
199 | 199 | |
200 | 200 | if (null !== $channel) { |
201 | 201 | $product->addChannel($channel); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | /** @var ProductVariantInterface $productVariant */ |
251 | 251 | $productVariant = $this->defaultVariantResolver->getVariant($product); |
252 | 252 | |
253 | - $product->setDescription('Awesome '.$productName); |
|
253 | + $product->setDescription('Awesome ' . $productName); |
|
254 | 254 | |
255 | 255 | foreach ($channels as $channel) { |
256 | 256 | $product->addChannel($channel); |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | $product->setCode(StringInflector::nameToUppercaseCode($productName)); |
301 | 301 | $product->setSlug($this->slugGenerator->generate($productName)); |
302 | 302 | |
303 | - $product->setDescription('Awesome '.$productName); |
|
303 | + $product->setDescription('Awesome ' . $productName); |
|
304 | 304 | |
305 | 305 | if ($this->sharedStorage->has('channel')) { |
306 | 306 | $channel = $this->sharedStorage->get('channel'); |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | public function thisProductHasPercentAttributeWithValue(ProductInterface $product, $productAttributeName, $value) |
445 | 445 | { |
446 | 446 | $attribute = $this->createProductAttribute('percent', $productAttributeName); |
447 | - $attributeValue = $this->createProductAttributeValue($value/100, $attribute); |
|
447 | + $attributeValue = $this->createProductAttributeValue($value / 100, $attribute); |
|
448 | 448 | $product->addAttribute($attributeValue); |
449 | 449 | |
450 | 450 | $this->objectManager->flush(); |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | { |
471 | 471 | $attribute = $this->createProductAttribute('percent', $productAttributeName); |
472 | 472 | $attribute->setPosition($position); |
473 | - $attributeValue = $this->createProductAttributeValue(rand(1, 100)/100, $attribute); |
|
473 | + $attributeValue = $this->createProductAttributeValue(rand(1, 100) / 100, $attribute); |
|
474 | 474 | |
475 | 475 | $product->addAttribute($attributeValue); |
476 | 476 | |
@@ -660,7 +660,7 @@ discard block |
||
660 | 660 | |
661 | 661 | /** @var ImageInterface $productImage */ |
662 | 662 | $productImage = $this->productImageFactory->createNew(); |
663 | - $productImage->setFile(new UploadedFile($filesPath.$imagePath, basename($imagePath))); |
|
663 | + $productImage->setFile(new UploadedFile($filesPath . $imagePath, basename($imagePath))); |
|
664 | 664 | $productImage->setCode($imageCode); |
665 | 665 | $this->imageUploader->upload($productImage); |
666 | 666 |
@@ -29,18 +29,21 @@ discard block |
||
29 | 29 | public function isCodeDisabled(); |
30 | 30 | |
31 | 31 | /** |
32 | + * @param string $locale |
|
32 | 33 | * @return bool |
33 | 34 | */ |
34 | 35 | public function isSlugReadOnlyIn($locale); |
35 | 36 | |
36 | 37 | /** |
37 | 38 | * @param int $price |
39 | + * @return void |
|
38 | 40 | */ |
39 | 41 | public function specifyPrice($price); |
40 | 42 | |
41 | 43 | /** |
42 | 44 | * @param string $name |
43 | 45 | * @param string $localeCode |
46 | + * @return void |
|
44 | 47 | */ |
45 | 48 | public function nameItIn($name, $localeCode); |
46 | 49 | |
@@ -67,11 +70,18 @@ discard block |
||
67 | 70 | |
68 | 71 | /** |
69 | 72 | * @param TaxonInterface $taxon |
73 | + * @return void |
|
70 | 74 | */ |
71 | 75 | public function selectMainTaxon(TaxonInterface $taxon); |
72 | 76 | |
77 | + /** |
|
78 | + * @return void |
|
79 | + */ |
|
73 | 80 | public function disableTracking(); |
74 | 81 | |
82 | + /** |
|
83 | + * @return void |
|
84 | + */ |
|
75 | 85 | public function enableTracking(); |
76 | 86 | |
77 | 87 | /** |
@@ -81,6 +91,7 @@ discard block |
||
81 | 91 | |
82 | 92 | /** |
83 | 93 | * @param string $locale |
94 | + * @return void |
|
84 | 95 | */ |
85 | 96 | public function enableSlugModification($locale); |
86 | 97 | |
@@ -94,20 +105,26 @@ discard block |
||
94 | 105 | /** |
95 | 106 | * @param string $path |
96 | 107 | * @param string $code |
108 | + * @return void |
|
97 | 109 | */ |
98 | 110 | public function attachImage($path, $code = null); |
99 | 111 | |
100 | 112 | /** |
101 | 113 | * @param string $code |
102 | 114 | * @param string $path |
115 | + * @return void |
|
103 | 116 | */ |
104 | 117 | public function changeImageWithCode($code, $path); |
105 | 118 | |
106 | 119 | /** |
107 | 120 | * @param string $code |
121 | + * @return void |
|
108 | 122 | */ |
109 | 123 | public function removeImageWithCode($code); |
110 | 124 | |
125 | + /** |
|
126 | + * @return void |
|
127 | + */ |
|
111 | 128 | public function removeFirstImage(); |
112 | 129 | |
113 | 130 | /** |
@@ -130,6 +147,7 @@ discard block |
||
130 | 147 | /** |
131 | 148 | * @param ProductAssociationTypeInterface $productAssociationType |
132 | 149 | * @param string[] $productsNames |
150 | + * @return void |
|
133 | 151 | */ |
134 | 152 | public function associateProducts(ProductAssociationTypeInterface $productAssociationType, array $productsNames); |
135 | 153 | |
@@ -144,6 +162,7 @@ discard block |
||
144 | 162 | /** |
145 | 163 | * @param string $productName |
146 | 164 | * @param ProductAssociationTypeInterface $productAssociationType |
165 | + * @return void |
|
147 | 166 | */ |
148 | 167 | public function removeAssociatedProduct($productName, ProductAssociationTypeInterface $productAssociationType); |
149 | 168 | |
@@ -157,6 +176,7 @@ discard block |
||
157 | 176 | |
158 | 177 | /** |
159 | 178 | * @param string $locale |
179 | + * @return void |
|
160 | 180 | */ |
161 | 181 | public function activateLanguageTab($locale); |
162 | 182 | |
@@ -170,6 +190,7 @@ discard block |
||
170 | 190 | /** |
171 | 191 | * @param string $slug |
172 | 192 | * @param string $locale |
193 | + * @return void |
|
173 | 194 | */ |
174 | 195 | public function specifySlugIn($slug, $locale); |
175 | 196 | } |
@@ -13,8 +13,8 @@ |
||
13 | 13 | |
14 | 14 | use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType; |
15 | 15 | use Symfony\Component\Form\Extension\Core\Type\ChoiceType; |
16 | -use Symfony\Component\Form\Extension\Core\Type\TextareaType; |
|
17 | 16 | use Symfony\Component\Form\Extension\Core\Type\TextType; |
17 | +use Symfony\Component\Form\Extension\Core\Type\TextareaType; |
|
18 | 18 | use Symfony\Component\Form\FormBuilderInterface; |
19 | 19 | use Symfony\Component\OptionsResolver\OptionsResolver; |
20 | 20 | use Symfony\Component\Validator\Constraints\Valid; |
@@ -12,9 +12,6 @@ |
||
12 | 12 | namespace Sylius\Bundle\TaxonomyBundle\DependencyInjection; |
13 | 13 | |
14 | 14 | use Sylius\Bundle\ResourceBundle\Controller\ResourceController; |
15 | -use Sylius\Bundle\ResourceBundle\Form\Type\ResourceFromIdentifierType; |
|
16 | -use Sylius\Bundle\ResourceBundle\Form\Type\ResourceToHiddenIdentifierType; |
|
17 | -use Sylius\Bundle\ResourceBundle\Form\Type\ResourceToIdentifierType; |
|
18 | 15 | use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; |
19 | 16 | use Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonTranslationType; |
20 | 17 | use Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonType; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | public function load(array $config, ContainerBuilder $container) |
28 | 28 | { |
29 | 29 | $config = $this->processConfiguration($this->getConfiguration($config, $container), $config); |
30 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
30 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
31 | 31 | |
32 | 32 | $loader->load('services.xml'); |
33 | 33 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | foreach ($resources as $subjectName => $subjectConfig) { |
57 | 57 | foreach ($subjectConfig as $resourceName => $resourceConfig) { |
58 | 58 | if (is_array($resourceConfig)) { |
59 | - $resolvedResources[$subjectName.'_'.$resourceName] = $resourceConfig; |
|
59 | + $resolvedResources[$subjectName . '_' . $resourceName] = $resourceConfig; |
|
60 | 60 | } |
61 | 61 | } |
62 | 62 | } |
@@ -26,10 +26,14 @@ |
||
26 | 26 | */ |
27 | 27 | public function checkValidationMessageFor($element, $message); |
28 | 28 | |
29 | + /** |
|
30 | + * @return void |
|
31 | + */ |
|
29 | 32 | public function reset(); |
30 | 33 | |
31 | 34 | /** |
32 | 35 | * @param string $email |
36 | + * @return void |
|
33 | 37 | */ |
34 | 38 | public function specifyEmail($email); |
35 | 39 | } |