Completed
Push — symfony3-fqcn-promotion ( 3a6e99...c2e0cd )
by Kamil
16:22
created
src/Sylius/Behat/Context/Setup/OrderContext.php 2 patches
Unused Use Statements   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,30 +14,29 @@
 block discarded – undo
14 14
 use Behat\Behat\Context\Context;
15 15
 use Doctrine\Common\Persistence\ObjectManager;
16 16
 use SM\Factory\FactoryInterface as StateMachineFactoryInterface;
17
+use Sylius\Behat\Service\SharedStorageInterface;
17 18
 use Sylius\Component\Core\Currency\CurrencyStorageInterface;
18
-use Sylius\Component\Core\Model\ChannelInterface;
19
-use Sylius\Component\Core\Model\PromotionCouponInterface;
20
-use Sylius\Component\Core\OrderCheckoutTransitions;
21
-use Sylius\Component\Order\Processor\OrderProcessorInterface;
22
-use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface;
23 19
 use Sylius\Component\Core\Model\AddressInterface;
20
+use Sylius\Component\Core\Model\ChannelInterface;
24 21
 use Sylius\Component\Core\Model\OrderInterface;
25 22
 use Sylius\Component\Core\Model\OrderItemInterface;
26 23
 use Sylius\Component\Core\Model\ProductInterface;
27 24
 use Sylius\Component\Core\Model\ProductVariantInterface;
25
+use Sylius\Component\Core\Model\PromotionCouponInterface;
28 26
 use Sylius\Component\Core\Model\ShippingMethodInterface;
27
+use Sylius\Component\Core\OrderCheckoutTransitions;
29 28
 use Sylius\Component\Core\Repository\OrderRepositoryInterface;
30
-use Sylius\Behat\Service\SharedStorageInterface;
29
+use Sylius\Component\Customer\Model\CustomerInterface;
30
+use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface;
31 31
 use Sylius\Component\Order\OrderTransitions;
32
-use Sylius\Component\Payment\Model\PaymentInterface;
32
+use Sylius\Component\Order\Processor\OrderProcessorInterface;
33 33
 use Sylius\Component\Payment\Model\PaymentMethodInterface;
34 34
 use Sylius\Component\Payment\PaymentTransitions;
35
+use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
35 36
 use Sylius\Component\Resource\Factory\FactoryInterface;
36 37
 use Sylius\Component\Resource\Repository\RepositoryInterface;
37 38
 use Sylius\Component\Shipping\ShipmentTransitions;
38
-use Sylius\Component\Customer\Model\CustomerInterface;
39 39
 use Sylius\Component\User\Model\UserInterface;
40
-use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
41 40
 
42 41
 /**
43 42
  * @author Łukasz Chruściel <[email protected]>
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
     ) {
369 369
         $customer = $user->getCustomer();
370 370
         for ($i = 0; $i < $numberOfOrders; $i++) {
371
-            $order = $this->createOrder($customer, '#00000'.$i);
371
+            $order = $this->createOrder($customer, '#00000' . $i);
372 372
             $this->checkoutUsing($order, $shippingMethod, clone $address, $paymentMethod);
373 373
             $this->applyPaymentTransitionOnOrder($order, PaymentTransitions::TRANSITION_COMPLETE);
374 374
 
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
         $total = $this->getPriceFromString($total);
416 416
 
417 417
         for ($i = 0; $i < $numberOfOrders; $i++) {
418
-            $order = $this->createOrder($customers[rand(0, $numberOfCustomers - 1)], '#'.uniqid());
418
+            $order = $this->createOrder($customers[rand(0, $numberOfCustomers - 1)], '#' . uniqid());
419 419
             $order->setState(OrderInterface::STATE_NEW); // Temporary, we should use checkout to place these orders.
420 420
             $this->applyPaymentTransitionOnOrder($order, PaymentTransitions::TRANSITION_COMPLETE);
421 421
 
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
         $total = $this->getPriceFromString($total);
446 446
 
447 447
         for ($i = 0; $i < $numberOfOrders; $i++) {
448
-            $order = $this->createOrder($customers[rand(0, $numberOfCustomers - 1)], '#'.uniqid(), $product->getChannels()->first());
448
+            $order = $this->createOrder($customers[rand(0, $numberOfCustomers - 1)], '#' . uniqid(), $product->getChannels()->first());
449 449
             $order->setState(OrderInterface::STATE_NEW);
450 450
             $this->applyPaymentTransitionOnOrder($order, PaymentTransitions::TRANSITION_COMPLETE);
451 451
 
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
             $customer = $this->customerFactory->createNew();
622 622
             $customer->setEmail(sprintf('john%[email protected]', uniqid()));
623 623
             $customer->setFirstname('John');
624
-            $customer->setLastname('Doe'.$i);
624
+            $customer->setLastname('Doe' . $i);
625 625
 
626 626
             $customers[] = $customer;
627 627
 
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Transform/OrderContext.php 1 patch
Unused Use Statements   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,9 +12,8 @@
 block discarded – undo
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
 /**
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Transform/ProductVariantContext.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Ui/Admin/ManagingProductsContext.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -205,6 +205,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,17 +15,17 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php 3 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,6 +150,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@
 block discarded – undo
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
 /**
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Ui/ThemeContext.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@
 block discarded – undo
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
 /**
Please login to merge, or discard this patch.
src/Sylius/Behat/Page/Admin/Account/LoginPageInterface.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -25,15 +25,20 @@
 block discarded – undo
25 25
      */
26 26
     public function hasValidationErrorWith($message);
27 27
 
28
+    /**
29
+     * @return void
30
+     */
28 31
     public function logIn();
29 32
 
30 33
     /**
31 34
      * @param string $password
35
+     * @return void
32 36
      */
33 37
     public function specifyPassword($password);
34 38
 
35 39
     /**
36 40
      * @param string $userName
41
+     * @return void
37 42
      */
38 43
     public function specifyUserName($userName);
39 44
 }
Please login to merge, or discard this patch.
src/Sylius/Behat/Page/Admin/Administrator/CreatePageInterface.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -39,25 +39,32 @@
 block discarded – undo
39 39
      */
40 40
     public function checkGenerationValidation($message);
41 41
 
42
+    /**
43
+     * @return void
44
+     */
42 45
     public function generate();
43 46
 
44 47
     /**
45 48
      * @param int $amount
49
+     * @return void
46 50
      */
47 51
     public function specifyAmount($amount);
48 52
 
49 53
     /**
50 54
      * @param int $codeLength
55
+     * @return void
51 56
      */
52 57
     public function specifyCodeLength($codeLength);
53 58
 
54 59
     /**
55 60
      * @param \DateTime $date
61
+     * @return void
56 62
      */
57 63
     public function setExpiresAt(\DateTime $date);
58 64
 
59 65
     /**
60 66
      * @param int $limit
67
+     * @return void
61 68
      */
62 69
     public function setUsageLimit($limit);
63 70
 }
Please login to merge, or discard this patch.
src/Sylius/Behat/Page/Admin/Administrator/UpdatePageInterface.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -36,11 +36,13 @@  discard block
 block discarded – undo
36 36
 
37 37
     /**
38 38
      * @param string $locale
39
+     * @return void
39 40
      */
40 41
     public function setCurrentLocale($locale);
41 42
 
42 43
     /**
43 44
      * @param string $locale
45
+     * @return void
44 46
      */
45 47
     public function setFallbackLocale($locale);
46 48
 
@@ -51,11 +53,13 @@  discard block
 block discarded – undo
51 53
 
52 54
     /**
53 55
      * @param TranslationInterface $translation
56
+     * @return void
54 57
      */
55 58
     public function addTranslation(TranslationInterface $translation);
56 59
 
57 60
     /**
58 61
      * @param TranslationInterface $translation
62
+     * @return void
59 63
      */
60 64
     public function removeTranslation(TranslationInterface $translation);
61 65
 }
Please login to merge, or discard this patch.