@@ -14,7 +14,6 @@ |
||
| 14 | 14 | use Sylius\Bundle\CoreBundle\Controller\ProductTaxonController; |
| 15 | 15 | use Sylius\Bundle\CoreBundle\Form\Type\Product\ChannelPricingType; |
| 16 | 16 | use Sylius\Bundle\ResourceBundle\Controller\ResourceController; |
| 17 | -use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository; |
|
| 18 | 17 | use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; |
| 19 | 18 | use Sylius\Component\Core\Model\ChannelPricing; |
| 20 | 19 | use Sylius\Component\Core\Model\ChannelPricingInterface; |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | public function load(array $config, ContainerBuilder $container) |
| 29 | 29 | { |
| 30 | 30 | $config = $this->processConfiguration($this->getConfiguration([], $container), $config); |
| 31 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 31 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 32 | 32 | |
| 33 | 33 | $container->setParameter('sylius_money.locale', $config['locale']); |
| 34 | 34 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | return; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 47 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 48 | 48 | $loader->load('services/integrations/currency.xml'); |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -87,11 +87,11 @@ discard block |
||
| 87 | 87 | { |
| 88 | 88 | if ($configuration->isHeaderRedirection()) { |
| 89 | 89 | return new Response('', 200, [ |
| 90 | - 'X-SYLIUS-LOCATION' => $url.$configuration->getRedirectHash(), |
|
| 90 | + 'X-SYLIUS-LOCATION' => $url . $configuration->getRedirectHash(), |
|
| 91 | 91 | ]); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - return new RedirectResponse($url.$configuration->getRedirectHash(), $status); |
|
| 94 | + return new RedirectResponse($url . $configuration->getRedirectHash(), $status); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -99,6 +99,6 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function redirectToReferer(RequestConfiguration $configuration) |
| 101 | 101 | { |
| 102 | - return $this->redirect($configuration, $configuration->getRedirectReferer().$configuration->getRedirectHash()); |
|
| 102 | + return $this->redirect($configuration, $configuration->getRedirectReferer() . $configuration->getRedirectHash()); |
|
| 103 | 103 | } |
| 104 | 104 | } |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | */ |
| 164 | 164 | public function getRouteName($name) |
| 165 | 165 | { |
| 166 | - $sectionPrefix = $this->getSection() ? $this->getSection().'_' : ''; |
|
| 166 | + $sectionPrefix = $this->getSection() ? $this->getSection() . '_' : ''; |
|
| 167 | 167 | |
| 168 | 168 | return sprintf('%s_%s%s_%s', $this->metadata->getApplicationName(), $sectionPrefix, $this->metadata->getName(), $name); |
| 169 | 169 | } |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | return ''; |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | - return '#'.$redirect['hash']; |
|
| 208 | + return '#' . $redirect['hash']; |
|
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | /** |
@@ -11,11 +11,8 @@ |
||
| 11 | 11 | |
| 12 | 12 | namespace Sylius\Bundle\CoreBundle\Checkout; |
| 13 | 13 | |
| 14 | -use Sylius\Bundle\ResourceBundle\Controller\RedirectHandlerInterface; |
|
| 15 | -use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration; |
|
| 16 | 14 | use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; |
| 17 | 15 | use Sylius\Component\Core\Model\OrderInterface; |
| 18 | -use Sylius\Component\Resource\Model\ResourceInterface; |
|
| 19 | 16 | use Symfony\Component\HttpFoundation\RedirectResponse; |
| 20 | 17 | use Symfony\Component\HttpFoundation\RequestMatcherInterface; |
| 21 | 18 | use Symfony\Component\HttpFoundation\RequestStack; |
@@ -13,7 +13,6 @@ |
||
| 13 | 13 | |
| 14 | 14 | use Sylius\Component\Core\Model\OrderInterface; |
| 15 | 15 | use Sylius\Component\Core\Model\PaymentMethodInterface; |
| 16 | -use Sylius\Component\Core\Model\ShippingMethodInterface; |
|
| 17 | 16 | use Symfony\Component\HttpFoundation\Response; |
| 18 | 17 | |
| 19 | 18 | /** |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | $this->addressOrder($cart); |
| 60 | 60 | |
| 61 | - $this->client->request('PATCH', $this->getSelectPaymentUrl($cart), [], [], static::$authorizedHeaderWithContentType); |
|
| 61 | + $this->client->request('PATCH', $this->getSelectPaymentUrl($cart), [], [], static::$authorizedHeaderWithContentType); |
|
| 62 | 62 | |
| 63 | 63 | $response = $this->client->getResponse(); |
| 64 | 64 | $this->assertResponse($response, 'checkout/payment_invalid_order_state', Response::HTTP_INTERNAL_SERVER_ERROR); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | } |
| 90 | 90 | EOT; |
| 91 | 91 | |
| 92 | - $this->client->request('PUT', $this->getSelectPaymentUrl($cart), [], [], static::$authorizedHeaderWithContentType, $data); |
|
| 92 | + $this->client->request('PUT', $this->getSelectPaymentUrl($cart), [], [], static::$authorizedHeaderWithContentType, $data); |
|
| 93 | 93 | |
| 94 | 94 | $response = $this->client->getResponse(); |
| 95 | 95 | |
@@ -12,8 +12,6 @@ |
||
| 12 | 12 | namespace Sylius\Tests\Controller; |
| 13 | 13 | |
| 14 | 14 | use Lakion\ApiTestCase\JsonApiTestCase; |
| 15 | -use Sylius\Component\Core\Model\OrderInterface; |
|
| 16 | -use Sylius\Component\Order\Model\OrderItemInterface; |
|
| 17 | 15 | use Symfony\Component\HttpFoundation\Response; |
| 18 | 16 | |
| 19 | 17 | /** |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
| 62 | 62 | $orderData = $this->loadFixturesFromFile('resources/cart.yml'); |
| 63 | 63 | |
| 64 | - $this->client->request('GET', '/api/v1/orders/'.$orderData['order_001']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
| 64 | + $this->client->request('GET', '/api/v1/orders/' . $orderData['order_001']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
| 65 | 65 | |
| 66 | 66 | $response = $this->client->getResponse(); |
| 67 | 67 | $this->assertResponse($response, 'order/cart_show_response', Response::HTTP_OK); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
| 76 | 76 | $orderData = $this->loadFixturesFromFile('resources/order.yml'); |
| 77 | 77 | |
| 78 | - $this->client->request('GET', '/api/v1/orders/'.$orderData['order_001']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
| 78 | + $this->client->request('GET', '/api/v1/orders/' . $orderData['order_001']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
| 79 | 79 | |
| 80 | 80 | $response = $this->client->getResponse(); |
| 81 | 81 | $this->assertResponse($response, 'order/order_show_response', Response::HTTP_OK); |
@@ -127,7 +127,7 @@ |
||
| 127 | 127 | */ |
| 128 | 128 | private function getPaymentMethods(PaymentInterface $payment, $locale) |
| 129 | 129 | { |
| 130 | - $paymentMethods = $this->paymentMethodResolver->getSupportedMethods($payment); |
|
| 130 | + $paymentMethods = $this->paymentMethodResolver->getSupportedMethods($payment); |
|
| 131 | 131 | |
| 132 | 132 | $rawPaymentMethods = []; |
| 133 | 133 | |
@@ -136,7 +136,7 @@ |
||
| 136 | 136 | */ |
| 137 | 137 | private function getCalculatedShippingMethods(ShipmentInterface $shipment, $locale) |
| 138 | 138 | { |
| 139 | - $shippingMethods = $this->shippingMethodsResolver->getSupportedMethods($shipment); |
|
| 139 | + $shippingMethods = $this->shippingMethodsResolver->getSupportedMethods($shipment); |
|
| 140 | 140 | |
| 141 | 141 | $rawShippingMethods = []; |
| 142 | 142 | |