@@ -17,7 +17,6 @@ |
||
17 | 17 | use Sylius\Component\Resource\Metadata\MetadataInterface; |
18 | 18 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
19 | 19 | use Symfony\Component\DependencyInjection\Definition; |
20 | -use Symfony\Component\DependencyInjection\Parameter; |
|
21 | 20 | use Symfony\Component\DependencyInjection\Reference; |
22 | 21 | |
23 | 22 | /** |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | */ |
46 | 46 | private function specifyAddress(AddressInterface $address, $addressType) |
47 | 47 | { |
48 | - $this->specifyElementValue($addressType.'_first_name', $address->getFirstName()); |
|
49 | - $this->specifyElementValue($addressType.'_last_name', $address->getLastName()); |
|
50 | - $this->specifyElementValue($addressType.'_street', $address->getStreet()); |
|
51 | - $this->specifyElementValue($addressType.'_city', $address->getCity()); |
|
52 | - $this->specifyElementValue($addressType.'_postcode', $address->getPostcode()); |
|
48 | + $this->specifyElementValue($addressType . '_first_name', $address->getFirstName()); |
|
49 | + $this->specifyElementValue($addressType . '_last_name', $address->getLastName()); |
|
50 | + $this->specifyElementValue($addressType . '_street', $address->getStreet()); |
|
51 | + $this->specifyElementValue($addressType . '_city', $address->getCity()); |
|
52 | + $this->specifyElementValue($addressType . '_postcode', $address->getPostcode()); |
|
53 | 53 | |
54 | 54 | $this->chooseCountry($address->getCountryCode(), $addressType); |
55 | 55 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | private function chooseCountry($country, $addressType) |
116 | 116 | { |
117 | - $this->getElement($addressType.'_country')->selectOption((null !== $country) ? $country : 'Select'); |
|
117 | + $this->getElement($addressType . '_country')->selectOption((null !== $country) ? $country : 'Select'); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
@@ -103,7 +103,6 @@ |
||
103 | 103 | |
104 | 104 | /** |
105 | 105 | * @param int $price |
106 | - * @param string $currencyCode |
|
107 | 106 | * |
108 | 107 | * @return float |
109 | 108 | */ |
@@ -57,33 +57,33 @@ |
||
57 | 57 | |
58 | 58 | $m = 0; |
59 | 59 | foreach ($order->getItems() as $item) { |
60 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = $item->getVariant()->getProduct()->getName(); |
|
61 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->formatPrice($item->getDiscountedUnitPrice()); |
|
62 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = $item->getQuantity(); |
|
60 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = $item->getVariant()->getProduct()->getName(); |
|
61 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->formatPrice($item->getDiscountedUnitPrice()); |
|
62 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = $item->getQuantity(); |
|
63 | 63 | |
64 | 64 | ++$m; |
65 | 65 | } |
66 | 66 | |
67 | 67 | if (0 !== $taxTotal = $order->getAdjustmentsTotalRecursively(AdjustmentInterface::TAX_ADJUSTMENT)) { |
68 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = 'Tax Total'; |
|
69 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->formatPrice($taxTotal); |
|
70 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = 1; |
|
68 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = 'Tax Total'; |
|
69 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->formatPrice($taxTotal); |
|
70 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = 1; |
|
71 | 71 | |
72 | 72 | ++$m; |
73 | 73 | } |
74 | 74 | |
75 | 75 | if (0 !== $promotionTotal = $order->getOrderPromotionTotal()) { |
76 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = 'Discount'; |
|
77 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->formatPrice($promotionTotal); |
|
78 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = 1; |
|
76 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = 'Discount'; |
|
77 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->formatPrice($promotionTotal); |
|
78 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = 1; |
|
79 | 79 | |
80 | 80 | ++$m; |
81 | 81 | } |
82 | 82 | |
83 | 83 | if (0 !== $shippingTotal = $order->getShippingTotal()) { |
84 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = 'Shipping Total'; |
|
85 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->formatPrice($shippingTotal); |
|
86 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = 1; |
|
84 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = 'Shipping Total'; |
|
85 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->formatPrice($shippingTotal); |
|
86 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = 1; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | $request->setResult($details); |
@@ -11,7 +11,6 @@ |
||
11 | 11 | |
12 | 12 | namespace Sylius\Bundle\CoreBundle\Fixture\Factory; |
13 | 13 | |
14 | -use Doctrine\Common\Persistence\ObjectManager; |
|
15 | 14 | use Sylius\Component\Core\Formatter\StringInflector; |
16 | 15 | use Sylius\Component\Core\Model\TaxonInterface; |
17 | 16 | use Sylius\Component\Locale\Model\LocaleInterface; |
@@ -94,7 +94,7 @@ |
||
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
97 | - * @return array |
|
97 | + * @return \Generator |
|
98 | 98 | */ |
99 | 99 | private function getLocales() |
100 | 100 | { |
@@ -96,7 +96,7 @@ |
||
96 | 96 | return $this->faker->email; |
97 | 97 | }) |
98 | 98 | ->setDefault('username', function (Options $options) { |
99 | - return $this->faker->firstName.' '.$this->faker->lastName; |
|
99 | + return $this->faker->firstName . ' ' . $this->faker->lastName; |
|
100 | 100 | }) |
101 | 101 | ->setDefault('enabled', true) |
102 | 102 | ->setAllowedTypes('enabled', 'bool') |
@@ -14,9 +14,7 @@ |
||
14 | 14 | use Sylius\Bundle\ResourceBundle\DependencyInjection\Extension\AbstractResourceExtension; |
15 | 15 | use Symfony\Component\Config\FileLocator; |
16 | 16 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
17 | -use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; |
|
18 | 17 | use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; |
19 | -use Symfony\Component\DependencyInjection\Reference; |
|
20 | 18 | |
21 | 19 | /** |
22 | 20 | * @author Paweł Jędrzejewski <[email protected]> |
@@ -27,7 +27,7 @@ |
||
27 | 27 | public function load(array $config, ContainerBuilder $container) |
28 | 28 | { |
29 | 29 | $config = $this->processConfiguration($this->getConfiguration([], $container), $config); |
30 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
30 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
31 | 31 | |
32 | 32 | $this->registerResources('sylius', $config['driver'], $config['resources'], $container); |
33 | 33 |
@@ -17,7 +17,6 @@ |
||
17 | 17 | use Sylius\Component\Customer\Context\CustomerContextInterface; |
18 | 18 | use Sylius\Component\Order\Context\CartContextInterface; |
19 | 19 | use Sylius\Component\Order\Context\CartNotFoundException; |
20 | -use Sylius\Component\Order\Model\OrderInterface; |
|
21 | 20 | |
22 | 21 | /** |
23 | 22 | * @author Mateusz Zalewski <[email protected]> |
@@ -75,7 +75,7 @@ |
||
75 | 75 | * @param ReviewInterface $review |
76 | 76 | * @param ReviewableInterface[] $reviewSubjectsToRecalculate |
77 | 77 | * |
78 | - * @return array |
|
78 | + * @return ReviewableInterface[] |
|
79 | 79 | */ |
80 | 80 | private function removeReviewsAndExtractSubject(ReviewInterface $review, array $reviewSubjectsToRecalculate) |
81 | 81 | { |
@@ -14,9 +14,9 @@ |
||
14 | 14 | use Doctrine\Common\Persistence\ObjectManager; |
15 | 15 | use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository; |
16 | 16 | use Sylius\Bundle\ReviewBundle\Updater\ReviewableRatingUpdaterInterface; |
17 | +use Sylius\Component\Review\Model\ReviewInterface; |
|
17 | 18 | use Sylius\Component\Review\Model\ReviewableInterface; |
18 | 19 | use Sylius\Component\Review\Model\ReviewerInterface; |
19 | -use Sylius\Component\Review\Model\ReviewInterface; |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * @author Grzegorz Sadowski <[email protected]> |
@@ -32,6 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | /** |
34 | 34 | * @param null|\DateTime $checkoutCompletedAt |
35 | + * @return void |
|
35 | 36 | */ |
36 | 37 | public function setCheckoutCompletedAt(\DateTime $checkoutCompletedAt = null); |
37 | 38 | |
@@ -40,6 +41,9 @@ discard block |
||
40 | 41 | */ |
41 | 42 | public function isCheckoutCompleted(); |
42 | 43 | |
44 | + /** |
|
45 | + * @return void |
|
46 | + */ |
|
43 | 47 | public function completeCheckout(); |
44 | 48 | |
45 | 49 | /** |
@@ -49,6 +53,7 @@ discard block |
||
49 | 53 | |
50 | 54 | /** |
51 | 55 | * @param string |
56 | + * @return void |
|
52 | 57 | */ |
53 | 58 | public function setNumber($number); |
54 | 59 | |
@@ -59,6 +64,7 @@ discard block |
||
59 | 64 | |
60 | 65 | /** |
61 | 66 | * @param string $notes |
67 | + * @return void |
|
62 | 68 | */ |
63 | 69 | public function setNotes($notes); |
64 | 70 | |
@@ -67,6 +73,9 @@ discard block |
||
67 | 73 | */ |
68 | 74 | public function getItems(); |
69 | 75 | |
76 | + /** |
|
77 | + * @return void |
|
78 | + */ |
|
70 | 79 | public function clearItems(); |
71 | 80 | |
72 | 81 | /** |
@@ -76,11 +85,13 @@ discard block |
||
76 | 85 | |
77 | 86 | /** |
78 | 87 | * @param OrderItemInterface $item |
88 | + * @return void |
|
79 | 89 | */ |
80 | 90 | public function addItem(OrderItemInterface $item); |
81 | 91 | |
82 | 92 | /** |
83 | 93 | * @param OrderItemInterface $item |
94 | + * @return void |
|
84 | 95 | */ |
85 | 96 | public function removeItem(OrderItemInterface $item); |
86 | 97 | |
@@ -96,6 +107,9 @@ discard block |
||
96 | 107 | */ |
97 | 108 | public function getItemsTotal(); |
98 | 109 | |
110 | + /** |
|
111 | + * @return void |
|
112 | + */ |
|
99 | 113 | public function recalculateItemsTotal(); |
100 | 114 | |
101 | 115 | /** |
@@ -115,6 +129,7 @@ discard block |
||
115 | 129 | |
116 | 130 | /** |
117 | 131 | * @param string $state |
132 | + * @return void |
|
118 | 133 | */ |
119 | 134 | public function setState($state); |
120 | 135 | |
@@ -139,6 +154,7 @@ discard block |
||
139 | 154 | |
140 | 155 | /** |
141 | 156 | * @param string|null $type |
157 | + * @return void |
|
142 | 158 | */ |
143 | 159 | public function removeAdjustmentsRecursively($type = null); |
144 | 160 | } |