@@ -64,5 +64,5 @@ |
||
64 | 64 | * |
65 | 65 | * @return bool |
66 | 66 | */ |
67 | - public function hasAttributeWithValue($attributeName, $AttributeValue); |
|
67 | + public function hasAttributeWithValue($attributeName, $AttributeValue); |
|
68 | 68 | } |
@@ -31,6 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | /** |
33 | 33 | * @param string $name |
34 | + * @return void |
|
34 | 35 | */ |
35 | 36 | public function setName($name); |
36 | 37 | |
@@ -41,6 +42,7 @@ discard block |
||
41 | 42 | |
42 | 43 | /** |
43 | 44 | * @param VariableInterface|null $object |
45 | + * @return void |
|
44 | 46 | */ |
45 | 47 | public function setObject(VariableInterface $object = null); |
46 | 48 | |
@@ -51,16 +53,19 @@ discard block |
||
51 | 53 | |
52 | 54 | /** |
53 | 55 | * @param Collection $options |
56 | + * @return void |
|
54 | 57 | */ |
55 | 58 | public function setOptions(Collection $options); |
56 | 59 | |
57 | 60 | /** |
58 | 61 | * @param OptionValueInterface $option |
62 | + * @return void |
|
59 | 63 | */ |
60 | 64 | public function addOption(OptionValueInterface $option); |
61 | 65 | |
62 | 66 | /** |
63 | 67 | * @param OptionValueInterface $option |
68 | + * @return void |
|
64 | 69 | */ |
65 | 70 | public function removeOption(OptionValueInterface $option); |
66 | 71 |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | */ |
133 | 133 | public function hasItemNamed($name) |
134 | 134 | { |
135 | - return $this->hasItemWith($name, '.sylius-product-name'); |
|
135 | + return $this->hasItemWith($name, '.sylius-product-name'); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | /** |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public function hasItemWithVariantNamed($variantName) |
142 | 142 | { |
143 | - return $this->hasItemWith($variantName, '.sylius-product-variant-name'); |
|
143 | + return $this->hasItemWith($variantName, '.sylius-product-variant-name'); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | function it_listens_on_pre_set_data_event() |
43 | 43 | { |
44 | - $this->getSubscribedEvents()->shouldReturn([FormEvents::PRE_SET_DATA => 'preSetData',]); |
|
44 | + $this->getSubscribedEvents()->shouldReturn([FormEvents::PRE_SET_DATA => 'preSetData', ]); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | function it_adds_author_guest_form_type_if_user_is_not_logged_in_and_review_subject_does_not_have_author( |
@@ -14,19 +14,19 @@ |
||
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\Component\Core\Model\AddressInterface; |
|
17 | 18 | use Sylius\Component\Core\Model\ChannelInterface; |
18 | 19 | use Sylius\Component\Core\Model\CouponInterface; |
19 | -use Sylius\Component\Core\OrderProcessing\OrderRecalculatorInterface; |
|
20 | -use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface; |
|
21 | -use Sylius\Component\Core\Model\AddressInterface; |
|
22 | 20 | use Sylius\Component\Core\Model\OrderInterface; |
23 | 21 | use Sylius\Component\Core\Model\OrderItemInterface; |
24 | 22 | use Sylius\Component\Core\Model\ProductInterface; |
25 | 23 | use Sylius\Component\Core\Model\ProductVariantInterface; |
26 | 24 | use Sylius\Component\Core\Model\ShippingMethodInterface; |
25 | +use Sylius\Component\Core\OrderProcessing\OrderRecalculatorInterface; |
|
27 | 26 | use Sylius\Component\Core\OrderProcessing\OrderShipmentProcessorInterface; |
28 | 27 | use Sylius\Component\Core\Repository\OrderRepositoryInterface; |
29 | 28 | use Sylius\Component\Core\Test\Services\SharedStorageInterface; |
29 | +use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface; |
|
30 | 30 | use Sylius\Component\Order\OrderTransitions; |
31 | 31 | use Sylius\Component\Payment\Factory\PaymentFactoryInterface; |
32 | 32 | use Sylius\Component\Payment\Model\PaymentInterface; |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | { |
311 | 311 | $customer = $user->getCustomer(); |
312 | 312 | for ($i = 0; $i < $numberOfOrders; $i++) { |
313 | - $order = $this->createOrder($customer, '#00000'.$i); |
|
313 | + $order = $this->createOrder($customer, '#00000' . $i); |
|
314 | 314 | $order->setPaymentState(PaymentInterface::STATE_COMPLETED); |
315 | 315 | $order->setCompletedAt(new \DateTime()); |
316 | 316 | |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | $total = $this->getPriceFromString($total); |
359 | 359 | |
360 | 360 | for ($i = 0; $i < $numberOfOrders; $i++) { |
361 | - $order = $this->createOrder($customers[rand(0, $numberOfCustomers - 1)], '#'.uniqid()); |
|
361 | + $order = $this->createOrder($customers[rand(0, $numberOfCustomers - 1)], '#' . uniqid()); |
|
362 | 362 | $order->setPaymentState(PaymentInterface::STATE_COMPLETED); |
363 | 363 | $order->setCompletedAt(new \DateTime()); |
364 | 364 | |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | $customer = $this->customerFactory->createNew(); |
503 | 503 | $customer->setEmail(sprintf('john%[email protected]', uniqid())); |
504 | 504 | $customer->setFirstname('John'); |
505 | - $customer->setLastname('Doe'.$i); |
|
505 | + $customer->setLastname('Doe' . $i); |
|
506 | 506 | |
507 | 507 | $customers[] = $customer; |
508 | 508 |
@@ -175,6 +175,7 @@ discard block |
||
175 | 175 | |
176 | 176 | /** |
177 | 177 | * @Given /^([^"]+) gives ("[^"]+%") discount on shipping to every order$/ |
178 | + * @param integer $discount |
|
178 | 179 | */ |
179 | 180 | public function itGivesPercentageDiscountOnShippingToEveryOrder(PromotionInterface $promotion, $discount) |
180 | 181 | { |
@@ -429,7 +430,7 @@ discard block |
||
429 | 430 | } |
430 | 431 | |
431 | 432 | /** |
432 | - * @param array $taxonCodes |
|
433 | + * @param string[] $taxonCodes |
|
433 | 434 | * |
434 | 435 | * @return array |
435 | 436 | */ |
@@ -458,6 +459,7 @@ discard block |
||
458 | 459 | * @param PromotionInterface $promotion |
459 | 460 | * @param int $discount |
460 | 461 | * @param array $configuration |
462 | + * @param RuleInterface $rule |
|
461 | 463 | */ |
462 | 464 | private function createUnitFixedPromotion(PromotionInterface $promotion, $discount, array $configuration = [], $rule = null) |
463 | 465 | { |
@@ -468,6 +470,7 @@ discard block |
||
468 | 470 | * @param PromotionInterface $promotion |
469 | 471 | * @param int $discount |
470 | 472 | * @param array $configuration |
473 | + * @param RuleInterface $rule |
|
471 | 474 | */ |
472 | 475 | private function createUnitPercentagePromotion(PromotionInterface $promotion, $discount, array $configuration = [], $rule = null) |
473 | 476 | { |
@@ -18,7 +18,6 @@ |
||
18 | 18 | use Sylius\Component\Core\Model\ShippingMethodInterface; |
19 | 19 | use Sylius\Component\Core\Test\Services\SharedStorageInterface; |
20 | 20 | use Sylius\Component\Resource\Factory\FactoryInterface; |
21 | -use Sylius\Component\Resource\Repository\RepositoryInterface; |
|
22 | 21 | use Sylius\Component\Shipping\Calculator\DefaultCalculators; |
23 | 22 | use Sylius\Component\Shipping\Repository\ShippingMethodRepositoryInterface; |
24 | 23 | use Sylius\Component\Taxation\Model\TaxCategoryInterface; |
@@ -218,6 +218,6 @@ |
||
218 | 218 | */ |
219 | 219 | private function generateCodeFromNameAndZone($shippingMethodName, $zoneCode = null) |
220 | 220 | { |
221 | - return str_replace([' ', '-'], '_', strtolower($shippingMethodName)).'_'.strtolower($zoneCode); |
|
221 | + return str_replace([' ', '-'], '_', strtolower($shippingMethodName)) . '_' . strtolower($zoneCode); |
|
222 | 222 | } |
223 | 223 | } |
@@ -12,8 +12,8 @@ |
||
12 | 12 | namespace Sylius\Behat\Context\Ui\Admin; |
13 | 13 | |
14 | 14 | use Behat\Behat\Context\Context; |
15 | -use Sylius\Behat\Page\Admin\Crud\UpdatePageInterface; |
|
16 | 15 | use Sylius\Behat\Page\Admin\Crud\IndexPageInterface; |
16 | +use Sylius\Behat\Page\Admin\Crud\UpdatePageInterface; |
|
17 | 17 | use Sylius\Behat\Page\Admin\Customer\CreatePageInterface; |
18 | 18 | use Sylius\Component\User\Model\CustomerInterface; |
19 | 19 | use Webmozart\Assert\Assert; |
@@ -134,6 +134,7 @@ discard block |
||
134 | 134 | |
135 | 135 | /** |
136 | 136 | * @Then the :productVariantCode variant of the :product product should appear in the shop |
137 | + * @param string $productVariantCode |
|
137 | 138 | */ |
138 | 139 | public function theProductVariantShouldAppearInTheShop($productVariantCode, ProductInterface $product) |
139 | 140 | { |
@@ -280,6 +281,7 @@ discard block |
||
280 | 281 | |
281 | 282 | /** |
282 | 283 | * @param string $element |
284 | + * @param string $message |
|
283 | 285 | */ |
284 | 286 | private function assertValidationMessage($element, $message) |
285 | 287 | { |
@@ -337,6 +337,7 @@ |
||
337 | 337 | |
338 | 338 | /** |
339 | 339 | * @When /^I proceed selecting "([^"]*)" as shipping country with "([^"]*)" payment method$/ |
340 | + * @param string $paymentMethodName |
|
340 | 341 | */ |
341 | 342 | public function iProceedSelectingShippingCountryAndPaymentMethod($shippingCountry, $paymentMethodName) |
342 | 343 | { |
@@ -13,18 +13,18 @@ |
||
13 | 13 | |
14 | 14 | use Behat\Behat\Context\Context; |
15 | 15 | use Sylius\Behat\Page\Shop\Checkout\AddressingPageInterface; |
16 | -use Sylius\Behat\Page\Shop\Checkout\PaymentPageInterface; |
|
17 | -use Sylius\Behat\Page\Shop\Checkout\ShippingPageInterface; |
|
18 | -use Sylius\Behat\Page\Shop\Checkout\SummaryPageInterface; |
|
19 | -use Sylius\Behat\Page\Shop\Order\OrderPaymentsPageInterface; |
|
20 | 16 | use Sylius\Behat\Page\Shop\Checkout\AddressingStepInterface; |
21 | 17 | use Sylius\Behat\Page\Shop\Checkout\FinalizeStepInterface; |
18 | +use Sylius\Behat\Page\Shop\Checkout\PaymentPageInterface; |
|
22 | 19 | use Sylius\Behat\Page\Shop\Checkout\PaymentStepInterface; |
23 | 20 | use Sylius\Behat\Page\Shop\Checkout\SecurityStepInterface; |
21 | +use Sylius\Behat\Page\Shop\Checkout\ShippingPageInterface; |
|
24 | 22 | use Sylius\Behat\Page\Shop\Checkout\ShippingStepInterface; |
23 | +use Sylius\Behat\Page\Shop\Checkout\SummaryPageInterface; |
|
25 | 24 | use Sylius\Behat\Page\Shop\Checkout\ThankYouPageInterface; |
26 | -use Sylius\Component\Core\Formatter\StringInflector; |
|
25 | +use Sylius\Behat\Page\Shop\Order\OrderPaymentsPageInterface; |
|
27 | 26 | use Sylius\Behat\Service\SecurityServiceInterface; |
27 | +use Sylius\Component\Core\Formatter\StringInflector; |
|
28 | 28 | use Sylius\Component\Core\Model\AddressInterface; |
29 | 29 | use Sylius\Component\Core\Model\OrderInterface; |
30 | 30 | use Sylius\Component\Core\Model\ProductInterface; |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | */ |
531 | 531 | public function iShouldSeeThisShippingAddressAsShippingAddress($fullName) |
532 | 532 | { |
533 | - $address = $this->sharedStorage->get('shipping_address_'.StringInflector::nameToLowercaseCode($fullName)); |
|
533 | + $address = $this->sharedStorage->get('shipping_address_' . StringInflector::nameToLowercaseCode($fullName)); |
|
534 | 534 | Assert::true( |
535 | 535 | $this->summaryPage->hasShippingAddress($address), |
536 | 536 | 'Shipping address is improper.' |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | */ |
543 | 543 | public function iShouldSeeThisBillingAddressAsBillingAddress($fullName) |
544 | 544 | { |
545 | - $address = $this->sharedStorage->get('billing_address_'.StringInflector::nameToLowercaseCode($fullName)); |
|
545 | + $address = $this->sharedStorage->get('billing_address_' . StringInflector::nameToLowercaseCode($fullName)); |
|
546 | 546 | Assert::true( |
547 | 547 | $this->summaryPage->hasBillingAddress($address), |
548 | 548 | 'Billing address is improper.' |
@@ -622,7 +622,7 @@ discard block |
||
622 | 622 | { |
623 | 623 | Assert::true( |
624 | 624 | $this->summaryPage->hasShippingTotal($price), |
625 | - sprintf('The shipping total should be %s, but it is not.',$price) |
|
625 | + sprintf('The shipping total should be %s, but it is not.', $price) |
|
626 | 626 | ); |
627 | 627 | } |
628 | 628 |