@@ -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; |
@@ -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 | } |
@@ -16,7 +16,6 @@ |
||
16 | 16 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
17 | 17 | use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; |
18 | 18 | use Symfony\Component\DependencyInjection\Parameter; |
19 | -use Symfony\Component\DependencyInjection\Reference; |
|
20 | 19 | |
21 | 20 | /** |
22 | 21 | * @author Paweł Jędrzejewski <[email protected]> |
@@ -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; |
@@ -21,11 +21,11 @@ |
||
21 | 21 | || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1', '113.0.0.1'], true) || php_sapi_name() === 'cli-server') |
22 | 22 | ) { |
23 | 23 | header('HTTP/1.0 403 Forbidden'); |
24 | - exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); |
|
24 | + exit('You are not allowed to access this file. Check ' . basename(__FILE__) . ' for more information.'); |
|
25 | 25 | } |
26 | 26 | |
27 | -require_once __DIR__.'/../app/bootstrap.php.cache'; |
|
28 | -require_once __DIR__.'/../app/AppKernel.php'; |
|
27 | +require_once __DIR__ . '/../app/bootstrap.php.cache'; |
|
28 | +require_once __DIR__ . '/../app/AppKernel.php'; |
|
29 | 29 | |
30 | 30 | $kernel = new AppKernel('test_cached', false); |
31 | 31 | $kernel->loadClassCache(); |
@@ -21,11 +21,11 @@ |
||
21 | 21 | || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1', '113.0.0.1'], true) || php_sapi_name() === 'cli-server') |
22 | 22 | ) { |
23 | 23 | header('HTTP/1.0 403 Forbidden'); |
24 | - exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); |
|
24 | + exit('You are not allowed to access this file. Check ' . basename(__FILE__) . ' for more information.'); |
|
25 | 25 | } |
26 | 26 | |
27 | -require_once __DIR__.'/../app/bootstrap.php.cache'; |
|
28 | -require_once __DIR__.'/../app/AppKernel.php'; |
|
27 | +require_once __DIR__ . '/../app/bootstrap.php.cache'; |
|
28 | +require_once __DIR__ . '/../app/AppKernel.php'; |
|
29 | 29 | |
30 | 30 | $kernel = new AppKernel('test_cached', false); |
31 | 31 | $kernel->loadClassCache(); |
@@ -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 | /** |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | { |
170 | 170 | $product = $this->createProduct($productName, $price); |
171 | 171 | |
172 | - $product->setDescription('Awesome '.$productName); |
|
172 | + $product->setDescription('Awesome ' . $productName); |
|
173 | 173 | |
174 | 174 | if ($this->sharedStorage->has('channel')) { |
175 | 175 | $product->addChannel($this->sharedStorage->get('channel')); |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | |
221 | 221 | $product->setName($productName); |
222 | 222 | $product->setCode($this->convertToCode($productName)); |
223 | - $product->setDescription('Awesome '.$productName); |
|
223 | + $product->setDescription('Awesome ' . $productName); |
|
224 | 224 | |
225 | 225 | if ($this->sharedStorage->has('channel')) { |
226 | 226 | $channel = $this->sharedStorage->get('channel'); |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | */ |
323 | 323 | public function thisProductHasAttributeWithValue(ProductInterface $product, $productAttributeType, $productAttributeName, $value) |
324 | 324 | { |
325 | - $attribute = $this->createProductAttribute($productAttributeType,$productAttributeName); |
|
325 | + $attribute = $this->createProductAttribute($productAttributeType, $productAttributeName); |
|
326 | 326 | $attributeValue = $this->createProductAttributeValue($value, $attribute); |
327 | 327 | $product->addAttribute($attributeValue); |
328 | 328 | |
@@ -334,8 +334,8 @@ discard block |
||
334 | 334 | */ |
335 | 335 | public function thisProductHasPercentAttributeWithValue(ProductInterface $product, $productAttributeName, $value) |
336 | 336 | { |
337 | - $attribute = $this->createProductAttribute('percent',$productAttributeName); |
|
338 | - $attributeValue = $this->createProductAttributeValue($value/100, $attribute); |
|
337 | + $attribute = $this->createProductAttribute('percent', $productAttributeName); |
|
338 | + $attributeValue = $this->createProductAttributeValue($value / 100, $attribute); |
|
339 | 339 | $product->addAttribute($attributeValue); |
340 | 340 | |
341 | 341 | $this->objectManager->flush(); |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | |
533 | 533 | /** @var ImageInterface $productImage */ |
534 | 534 | $productImage = $this->productImageFactory->createNew(); |
535 | - $productImage->setFile(new UploadedFile($filesPath.$imagePath, basename($imagePath))); |
|
535 | + $productImage->setFile(new UploadedFile($filesPath . $imagePath, basename($imagePath))); |
|
536 | 536 | $productImage->setCode($imageCode); |
537 | 537 | $this->imageUploader->upload($productImage); |
538 | 538 |
@@ -267,6 +267,7 @@ discard block |
||
267 | 267 | |
268 | 268 | /** |
269 | 269 | * @Given /^([^"]+) gives ("[^"]+%") discount on shipping to every order$/ |
270 | + * @param integer $discount |
|
270 | 271 | */ |
271 | 272 | public function itGivesPercentageDiscountOnShippingToEveryOrder(PromotionInterface $promotion, $discount) |
272 | 273 | { |
@@ -564,7 +565,7 @@ discard block |
||
564 | 565 | } |
565 | 566 | |
566 | 567 | /** |
567 | - * @param array $taxonCodes |
|
568 | + * @param string[] $taxonCodes |
|
568 | 569 | * |
569 | 570 | * @return array |
570 | 571 | */ |
@@ -593,6 +594,7 @@ discard block |
||
593 | 594 | * @param PromotionInterface $promotion |
594 | 595 | * @param int $discount |
595 | 596 | * @param array $configuration |
597 | + * @param PromotionRuleInterface $rule |
|
596 | 598 | */ |
597 | 599 | private function createUnitFixedPromotion(PromotionInterface $promotion, $discount, array $configuration = [], $rule = null) |
598 | 600 | { |
@@ -603,6 +605,7 @@ discard block |
||
603 | 605 | * @param PromotionInterface $promotion |
604 | 606 | * @param int $discount |
605 | 607 | * @param array $configuration |
608 | + * @param PromotionRuleInterface $rule |
|
606 | 609 | */ |
607 | 610 | private function createUnitPercentagePromotion(PromotionInterface $promotion, $discount, array $configuration = [], $rule = null) |
608 | 611 | { |
@@ -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 | /** |