@@ -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 | } |
@@ -23,6 +23,7 @@ discard block |
||
23 | 23 | { |
24 | 24 | /** |
25 | 25 | * @throws ElementNotFoundException |
26 | + * @return void |
|
26 | 27 | */ |
27 | 28 | public function addToCart(); |
28 | 29 | |
@@ -30,6 +31,7 @@ discard block |
||
30 | 31 | * @param string $quantity |
31 | 32 | * |
32 | 33 | * @throws ElementNotFoundException |
34 | + * @return void |
|
33 | 35 | */ |
34 | 36 | public function addToCartWithQuantity($quantity); |
35 | 37 | |
@@ -37,6 +39,7 @@ discard block |
||
37 | 39 | * @param string $variant |
38 | 40 | * |
39 | 41 | * @throws ElementNotFoundException |
42 | + * @return void |
|
40 | 43 | */ |
41 | 44 | public function addToCartWithVariant($variant); |
42 | 45 | |
@@ -45,6 +48,7 @@ discard block |
||
45 | 48 | * @param string $optionValue |
46 | 49 | * |
47 | 50 | * @throws ElementNotFoundException |
51 | + * @return void |
|
48 | 52 | */ |
49 | 53 | public function addToCartWithOption(OptionInterface $option, $optionValue); |
50 | 54 | |
@@ -55,6 +59,7 @@ discard block |
||
55 | 59 | |
56 | 60 | /** |
57 | 61 | * @param string $url |
62 | + * @return void |
|
58 | 63 | */ |
59 | 64 | public function visit($url); |
60 | 65 |
@@ -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,8 +14,8 @@ |
||
14 | 14 | use PhpSpec\ObjectBehavior; |
15 | 15 | use Sylius\Bundle\CoreBundle\Form\EventSubscriber\AddAuthorGuestTypeFormSubscriber; |
16 | 16 | use Sylius\Component\Resource\Model\ResourceInterface; |
17 | -use Sylius\Component\Review\Model\ReviewerInterface; |
|
18 | 17 | use Sylius\Component\Review\Model\ReviewInterface; |
18 | +use Sylius\Component\Review\Model\ReviewerInterface; |
|
19 | 19 | use Symfony\Component\EventDispatcher\EventSubscriberInterface; |
20 | 20 | use Symfony\Component\Form\FormConfigInterface; |
21 | 21 | use Symfony\Component\Form\FormEvent; |
@@ -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 | } |
@@ -187,7 +187,7 @@ |
||
187 | 187 | /** |
188 | 188 | * @param string $taxRateAmount |
189 | 189 | * |
190 | - * @return string |
|
190 | + * @return integer |
|
191 | 191 | */ |
192 | 192 | private function getAmountFromString($taxRateAmount) |
193 | 193 | { |
@@ -212,6 +212,6 @@ |
||
212 | 212 | */ |
213 | 213 | private function getCodeFromNameAndZoneCode($taxRateName, $zoneCode) |
214 | 214 | { |
215 | - return $this->getCodeFromName($taxRateName).'_'.strtolower($zoneCode); |
|
215 | + return $this->getCodeFromName($taxRateName) . '_' . strtolower($zoneCode); |
|
216 | 216 | } |
217 | 217 | } |
@@ -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 | { |