@@ -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); |
@@ -14,7 +14,6 @@ |
||
| 14 | 14 | use Sylius\Bundle\PromotionBundle\Form\Type\Action\FixedDiscountConfigurationType; |
| 15 | 15 | use Sylius\Component\Core\Distributor\ProportionalIntegerDistributorInterface; |
| 16 | 16 | use Sylius\Component\Core\Promotion\Applicator\UnitsPromotionAdjustmentsApplicatorInterface; |
| 17 | -use Sylius\Component\Currency\Converter\CurrencyConverterInterface; |
|
| 18 | 17 | use Sylius\Component\Promotion\Model\PromotionInterface; |
| 19 | 18 | use Sylius\Component\Promotion\Model\PromotionSubjectInterface; |
| 20 | 19 | use Webmozart\Assert\Assert; |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | |
| 14 | 14 | use Sylius\Component\Core\Model\ShipmentInterface; |
| 15 | 15 | use Sylius\Component\Shipping\Calculator\CalculatorInterface; |
| 16 | -use Sylius\Component\Shipping\Model\ShipmentInterface as BaseShipmentInterface; |
|
| 16 | +use Sylius\Component\Shipping\Model\ShipmentInterface as BaseShipmentInterface; |
|
| 17 | 17 | use Webmozart\Assert\Assert; |
| 18 | 18 | |
| 19 | 19 | /** |
@@ -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') |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | ) { |
| 64 | 64 | $this->channelFactory = $channelFactory; |
| 65 | 65 | $this->localeRepository = $localeRepository; |
| 66 | - $this->currencyRepository= $currencyRepository; |
|
| 66 | + $this->currencyRepository = $currencyRepository; |
|
| 67 | 67 | |
| 68 | 68 | $this->faker = \Faker\Factory::create(); |
| 69 | 69 | $this->optionsResolver = new OptionsResolver(); |
@@ -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 | |
@@ -22,16 +22,19 @@ discard block |
||
| 22 | 22 | { |
| 23 | 23 | /** |
| 24 | 24 | * @param string $code |
| 25 | + * @return void |
|
| 25 | 26 | */ |
| 26 | 27 | public function specifyCode($code); |
| 27 | 28 | |
| 28 | 29 | /** |
| 29 | 30 | * @param string $name |
| 31 | + * @return void |
|
| 30 | 32 | */ |
| 31 | 33 | public function nameIt($name); |
| 32 | 34 | |
| 33 | 35 | /** |
| 34 | 36 | * @param string $ruleName |
| 37 | + * @return void |
|
| 35 | 38 | */ |
| 36 | 39 | public function addRule($ruleName); |
| 37 | 40 | |
@@ -39,12 +42,14 @@ discard block |
||
| 39 | 42 | * @param string $option |
| 40 | 43 | * @param string $value |
| 41 | 44 | * @param bool $multiple |
| 45 | + * @return void |
|
| 42 | 46 | */ |
| 43 | 47 | public function selectRuleOption($option, $value, $multiple = false); |
| 44 | 48 | |
| 45 | 49 | /** |
| 46 | 50 | * @param string $option |
| 47 | 51 | * @param string $value |
| 52 | + * @return void |
|
| 48 | 53 | */ |
| 49 | 54 | public function fillRuleOption($option, $value); |
| 50 | 55 | |
@@ -52,11 +57,13 @@ discard block |
||
| 52 | 57 | * @param string $channelName |
| 53 | 58 | * @param string $option |
| 54 | 59 | * @param string $value |
| 60 | + * @return void |
|
| 55 | 61 | */ |
| 56 | 62 | public function fillRuleOptionForChannel($channelName, $option, $value); |
| 57 | 63 | |
| 58 | 64 | /** |
| 59 | 65 | * @param string $actionName |
| 66 | + * @return void |
|
| 60 | 67 | */ |
| 61 | 68 | public function addAction($actionName); |
| 62 | 69 | |
@@ -64,12 +71,14 @@ discard block |
||
| 64 | 71 | * @param string $option |
| 65 | 72 | * @param string $value |
| 66 | 73 | * @param bool $multiple |
| 74 | + * @return void |
|
| 67 | 75 | */ |
| 68 | 76 | public function selectActionOption($option, $value, $multiple = false); |
| 69 | 77 | |
| 70 | 78 | /** |
| 71 | 79 | * @param string $option |
| 72 | 80 | * @param string $value |
| 81 | + * @return void |
|
| 73 | 82 | */ |
| 74 | 83 | public function fillActionOption($option, $value); |
| 75 | 84 | |
@@ -77,30 +86,41 @@ discard block |
||
| 77 | 86 | * @param string $channelName |
| 78 | 87 | * @param string $option |
| 79 | 88 | * @param string $value |
| 89 | + * @return void |
|
| 80 | 90 | */ |
| 81 | 91 | public function fillActionOptionForChannel($channelName, $option, $value); |
| 82 | 92 | |
| 83 | 93 | /** |
| 84 | 94 | * @param string $limit |
| 95 | + * @return void |
|
| 85 | 96 | */ |
| 86 | 97 | public function fillUsageLimit($limit); |
| 87 | 98 | |
| 99 | + /** |
|
| 100 | + * @return void |
|
| 101 | + */ |
|
| 88 | 102 | public function makeExclusive(); |
| 89 | 103 | |
| 104 | + /** |
|
| 105 | + * @return void |
|
| 106 | + */ |
|
| 90 | 107 | public function checkCouponBased(); |
| 91 | 108 | |
| 92 | 109 | /** |
| 93 | 110 | * @param string $name |
| 111 | + * @return void |
|
| 94 | 112 | */ |
| 95 | 113 | public function checkChannel($name); |
| 96 | 114 | |
| 97 | 115 | /** |
| 98 | 116 | * @param \DateTime $dateTime |
| 117 | + * @return void |
|
| 99 | 118 | */ |
| 100 | 119 | public function setStartsAt(\DateTime $dateTime); |
| 101 | 120 | |
| 102 | 121 | /** |
| 103 | 122 | * @param \DateTime $dateTime |
| 123 | + * @return void |
|
| 104 | 124 | */ |
| 105 | 125 | public function setEndsAt(\DateTime $dateTime); |
| 106 | 126 | |
@@ -115,6 +135,7 @@ discard block |
||
| 115 | 135 | * @param string $option |
| 116 | 136 | * @param string $value |
| 117 | 137 | * @param bool $multiple |
| 138 | + * @return void |
|
| 118 | 139 | */ |
| 119 | 140 | public function selectFilterOption($option, $value, $multiple = false); |
| 120 | 141 | } |