@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function load(array $config, ContainerBuilder $container) |
30 | 30 | { |
31 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
31 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
32 | 32 | $loader->load('services.xml'); |
33 | 33 | $loader->load('twig.xml'); |
34 | 34 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function load(array $config, ContainerBuilder $container) |
30 | 30 | { |
31 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
31 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
32 | 32 | $loader->load('services.xml'); |
33 | 33 | $loader->load('twig.xml'); |
34 | 34 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function load(array $config, ContainerBuilder $container) |
30 | 30 | { |
31 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
31 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
32 | 32 | $loader->load('services.xml'); |
33 | 33 | $loader->load('twig.xml'); |
34 | 34 | } |
@@ -11,8 +11,6 @@ |
||
11 | 11 | |
12 | 12 | namespace Sylius\Bundle\PayumBundle\DependencyInjection; |
13 | 13 | |
14 | -use Payum\Bundle\PayumBundle\DependencyInjection\MainConfiguration as PayumConfiguration; |
|
15 | -use Payum\Bundle\PayumBundle\DependencyInjection\PayumExtension; |
|
16 | 14 | use Sylius\Bundle\ResourceBundle\DependencyInjection\Extension\AbstractResourceExtension; |
17 | 15 | use Symfony\Component\Config\FileLocator; |
18 | 16 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | namespace spec\Sylius\Component\Registry; |
13 | 13 | |
14 | -require_once __DIR__.'/Fixture/SampleServiceInterface.php'; |
|
14 | +require_once __DIR__ . '/Fixture/SampleServiceInterface.php'; |
|
15 | 15 | |
16 | 16 | use PhpSpec\ObjectBehavior; |
17 | 17 | use Prophecy\Argument; |
@@ -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; |
@@ -23,16 +24,15 @@ discard block |
||
23 | 24 | use Sylius\Component\Core\Model\ProductTranslationInterface; |
24 | 25 | use Sylius\Component\Core\Model\ProductVariantInterface; |
25 | 26 | use Sylius\Component\Core\Repository\ProductRepositoryInterface; |
26 | -use Sylius\Behat\Service\SharedStorageInterface; |
|
27 | 27 | use Sylius\Component\Core\Uploader\ImageUploaderInterface; |
28 | 28 | use Sylius\Component\Product\Factory\ProductFactoryInterface; |
29 | 29 | use Sylius\Component\Product\Model\ProductAttributeInterface; |
30 | 30 | use Sylius\Component\Product\Model\ProductAttributeValueInterface; |
31 | 31 | use Sylius\Component\Product\Model\ProductOptionInterface; |
32 | 32 | use Sylius\Component\Product\Model\ProductOptionValueInterface; |
33 | +use Sylius\Component\Product\Resolver\ProductVariantResolverInterface; |
|
33 | 34 | use Sylius\Component\Resource\Factory\FactoryInterface; |
34 | 35 | use Sylius\Component\Taxation\Model\TaxCategoryInterface; |
35 | -use Sylius\Component\Product\Resolver\ProductVariantResolverInterface; |
|
36 | 36 | use Symfony\Component\HttpFoundation\File\UploadedFile; |
37 | 37 | |
38 | 38 | /** |
@@ -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 |
@@ -12,9 +12,8 @@ |
||
12 | 12 | namespace Sylius\Behat\Context\Transform; |
13 | 13 | |
14 | 14 | use Behat\Behat\Context\Context; |
15 | -use Sylius\Component\Core\Model\OrderInterface; |
|
16 | -use Sylius\Component\Core\Repository\OrderRepositoryInterface; |
|
17 | 15 | use Sylius\Component\Core\Repository\CustomerRepositoryInterface; |
16 | +use Sylius\Component\Core\Repository\OrderRepositoryInterface; |
|
18 | 17 | use Webmozart\Assert\Assert; |
19 | 18 | |
20 | 19 | /** |
@@ -13,7 +13,6 @@ |
||
13 | 13 | |
14 | 14 | use Behat\Behat\Context\Context; |
15 | 15 | use Sylius\Component\Core\Repository\ProductRepositoryInterface; |
16 | -use Sylius\Component\Core\Repository\ProductVariantRepositoryInterface; |
|
17 | 16 | use Sylius\Component\Resource\Repository\RepositoryInterface; |
18 | 17 | use Webmozart\Assert\Assert; |
19 | 18 |
@@ -205,6 +205,7 @@ |
||
205 | 205 | * @Then the product :productName should appear in the shop |
206 | 206 | * @Then the product :productName should be in the shop |
207 | 207 | * @Then this product should still be named :productName |
208 | + * @param string $productName |
|
208 | 209 | */ |
209 | 210 | public function theProductShouldAppearInTheShop($productName) |
210 | 211 | { |
@@ -15,17 +15,17 @@ |
||
15 | 15 | use Sylius\Behat\NotificationType; |
16 | 16 | use Sylius\Behat\Page\Admin\Crud\CreatePageInterface; |
17 | 17 | use Sylius\Behat\Page\Admin\Crud\UpdatePageInterface; |
18 | +use Sylius\Behat\Page\Admin\ProductReview\IndexPageInterface as ProductReviewIndexPageInterface; |
|
18 | 19 | use Sylius\Behat\Page\Admin\Product\CreateConfigurableProductPageInterface; |
19 | 20 | use Sylius\Behat\Page\Admin\Product\CreateSimpleProductPageInterface; |
20 | 21 | use Sylius\Behat\Page\Admin\Product\IndexPageInterface; |
21 | 22 | use Sylius\Behat\Page\Admin\Product\UpdateConfigurableProductPageInterface; |
22 | 23 | use Sylius\Behat\Page\Admin\Product\UpdateSimpleProductPageInterface; |
23 | -use Sylius\Behat\Page\Admin\ProductReview\IndexPageInterface as ProductReviewIndexPageInterface; |
|
24 | 24 | use Sylius\Behat\Service\NotificationCheckerInterface; |
25 | 25 | use Sylius\Behat\Service\Resolver\CurrentProductPageResolverInterface; |
26 | +use Sylius\Behat\Service\SharedStorageInterface; |
|
26 | 27 | use Sylius\Component\Core\Model\ChannelInterface; |
27 | 28 | use Sylius\Component\Core\Model\ProductInterface; |
28 | -use Sylius\Behat\Service\SharedStorageInterface; |
|
29 | 29 | use Sylius\Component\Currency\Model\CurrencyInterface; |
30 | 30 | use Sylius\Component\Product\Model\ProductAssociationTypeInterface; |
31 | 31 | use Sylius\Component\Taxonomy\Model\TaxonInterface; |
@@ -150,6 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | /** |
152 | 152 | * @Then the :productVariantCode variant of the :product product should appear in the shop |
153 | + * @param string $productVariantCode |
|
153 | 154 | */ |
154 | 155 | public function theProductVariantShouldAppearInTheShop($productVariantCode, ProductInterface $product) |
155 | 156 | { |
@@ -451,7 +452,7 @@ discard block |
||
451 | 452 | |
452 | 453 | /** |
453 | 454 | * @param string $element |
454 | - * @param $message |
|
455 | + * @param string $message |
|
455 | 456 | */ |
456 | 457 | private function assertValidationMessage($element, $message) |
457 | 458 | { |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | { |
289 | 289 | Assert::true( |
290 | 290 | $this->indexPage->isSingleResourceWithSpecificElementOnPage(['name' => $productVariantName], sprintf('td > div.ui.label:contains("%s")', $quantity)), |
291 | - sprintf('The product variant %s should have %s items on hand, but it does not.',$productVariantName, $quantity) |
|
291 | + sprintf('The product variant %s should have %s items on hand, but it does not.', $productVariantName, $quantity) |
|
292 | 292 | ); |
293 | 293 | } |
294 | 294 | |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | |
302 | 302 | Assert::true( |
303 | 303 | $this->indexPage->isSingleResourceWithSpecificElementOnPage(['name' => $productVariantName], sprintf('td > div.ui.label:contains("%s")', $quantity)), |
304 | - sprintf('The product variant %s should have %s items on hand, but it does not.',$productVariantName, $quantity) |
|
304 | + sprintf('The product variant %s should have %s items on hand, but it does not.', $productVariantName, $quantity) |
|
305 | 305 | ); |
306 | 306 | } |
307 | 307 |
@@ -15,9 +15,9 @@ |
||
15 | 15 | use Sylius\Behat\Page\Admin\Channel\IndexPageInterface; |
16 | 16 | use Sylius\Behat\Page\Admin\Channel\UpdatePageInterface; |
17 | 17 | use Sylius\Behat\Page\Shop\HomePageInterface; |
18 | +use Sylius\Behat\Service\SharedStorageInterface; |
|
18 | 19 | use Sylius\Bundle\ThemeBundle\Model\ThemeInterface; |
19 | 20 | use Sylius\Component\Core\Model\ChannelInterface; |
20 | -use Sylius\Behat\Service\SharedStorageInterface; |
|
21 | 21 | use Webmozart\Assert\Assert; |
22 | 22 | |
23 | 23 | /** |