@@ -318,7 +318,7 @@ |
||
| 318 | 318 | return $product->getVariants()[0]; |
| 319 | 319 | } |
| 320 | 320 | |
| 321 | - if ($product->hasOptions()){ |
|
| 321 | + if ($product->hasOptions()) { |
|
| 322 | 322 | return $this->getVariant($request->request->get('options'), $product); |
| 323 | 323 | } |
| 324 | 324 | |
@@ -300,7 +300,7 @@ |
||
| 300 | 300 | return $product->getVariants()[0]; |
| 301 | 301 | } |
| 302 | 302 | |
| 303 | - if ($product->hasOptions()){ |
|
| 303 | + if ($product->hasOptions()) { |
|
| 304 | 304 | return $this->getVariant($request->request->get('options'), $product); |
| 305 | 305 | } |
| 306 | 306 | |
@@ -4,10 +4,8 @@ |
||
| 4 | 4 | |
| 5 | 5 | use FOS\RestBundle\View\View; |
| 6 | 6 | use FOS\RestBundle\View\ViewHandlerInterface; |
| 7 | -use Sylius\Component\Core\Model\ImageInterface; |
|
| 8 | 7 | use Sylius\Component\Core\Model\TaxonInterface; |
| 9 | 8 | use Sylius\Component\Taxonomy\Repository\TaxonRepositoryInterface; |
| 10 | -use Sylius\ShopApiPlugin\Factory\ImageViewFactoryInterface; |
|
| 11 | 9 | use Sylius\ShopApiPlugin\Factory\TaxonViewFactoryInterface; |
| 12 | 10 | use Sylius\ShopApiPlugin\View\TaxonView; |
| 13 | 11 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
@@ -44,8 +44,7 @@ |
||
| 44 | 44 | Address::createFromArray($request->request->get('shippingAddress')), |
| 45 | 45 | Address::createFromArray( |
| 46 | 46 | $request->request->has('billingAddress') ? |
| 47 | - $request->request->get('billingAddress') : |
|
| 48 | - $request->request->get('shippingAddress') |
|
| 47 | + $request->request->get('billingAddress') : $request->request->get('shippingAddress') |
|
| 49 | 48 | ) |
| 50 | 49 | )); |
| 51 | 50 | |
@@ -5,8 +5,6 @@ |
||
| 5 | 5 | use Sylius\Component\Core\Model\OrderInterface; |
| 6 | 6 | use Sylius\Component\Core\Model\OrderItemInterface; |
| 7 | 7 | use Sylius\ShopApiPlugin\View\CartSummaryView; |
| 8 | -use Sylius\ShopApiPlugin\View\TotalsView; |
|
| 9 | -use Sylius\ShopApiPlugin\View\ItemView; |
|
| 10 | 8 | |
| 11 | 9 | final class CartViewFactory implements CartViewFactoryInterface |
| 12 | 10 | { |
@@ -4,20 +4,12 @@ |
||
| 4 | 4 | |
| 5 | 5 | use FOS\RestBundle\View\View; |
| 6 | 6 | use FOS\RestBundle\View\ViewHandlerInterface; |
| 7 | -use Sylius\Component\Core\Factory\PaymentMethodFactoryInterface; |
|
| 8 | 7 | use Sylius\Component\Core\Model\OrderInterface; |
| 9 | 8 | use Sylius\Component\Core\Model\PaymentInterface; |
| 10 | 9 | use Sylius\Component\Core\Model\PaymentMethodInterface; |
| 11 | -use Sylius\Component\Core\Model\ShipmentInterface; |
|
| 12 | -use Sylius\Component\Core\Model\ShippingMethodInterface; |
|
| 13 | 10 | use Sylius\Component\Core\Repository\OrderRepositoryInterface; |
| 14 | 11 | use Sylius\Component\Payment\Resolver\PaymentMethodsResolverInterface; |
| 15 | -use Sylius\Component\Registry\ServiceRegistryInterface; |
|
| 16 | -use Sylius\Component\Shipping\Calculator\CalculatorInterface; |
|
| 17 | -use Sylius\Component\Shipping\Resolver\ShippingMethodsResolverInterface; |
|
| 18 | 12 | use Sylius\ShopApiPlugin\Factory\PaymentMethodViewFactoryInterface; |
| 19 | -use Sylius\ShopApiPlugin\View\PaymentMethodView; |
|
| 20 | -use Sylius\ShopApiPlugin\View\ShipmentMethodView; |
|
| 21 | 13 | use Symfony\Component\HttpFoundation\Request; |
| 22 | 14 | use Symfony\Component\HttpFoundation\Response; |
| 23 | 15 | |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | */ |
| 80 | 80 | private function provideCustometer(CompleteOrder $completeOrder) |
| 81 | 81 | { |
| 82 | - $customer = $this->customerRepository->findOneBy(['email' => $completeOrder->email()]); |
|
| 82 | + $customer = $this->customerRepository->findOneBy(['email' => $completeOrder->email()]); |
|
| 83 | 83 | |
| 84 | 84 | if (null === $customer) { |
| 85 | 85 | /** @var CustomerInterface $customer */ |
@@ -6,9 +6,7 @@ |
||
| 6 | 6 | use FOS\RestBundle\View\ViewHandlerInterface; |
| 7 | 7 | use Sylius\Component\Channel\Repository\ChannelRepositoryInterface; |
| 8 | 8 | use Sylius\Component\Core\Model\ChannelInterface; |
| 9 | -use Sylius\Component\Core\Model\ProductInterface; |
|
| 10 | 9 | use Sylius\Component\Core\Repository\ProductRepositoryInterface; |
| 11 | -use Sylius\Component\Product\Model\ProductAssociationInterface; |
|
| 12 | 10 | use Sylius\ShopApiPlugin\Factory\ProductViewFactoryInterface; |
| 13 | 11 | use Symfony\Component\HttpFoundation\Request; |
| 14 | 12 | use Symfony\Component\HttpFoundation\Response; |
@@ -5,9 +5,7 @@ |
||
| 5 | 5 | use Sylius\Component\Core\Model\ChannelInterface; |
| 6 | 6 | use Sylius\Component\Core\Model\ProductImageInterface; |
| 7 | 7 | use Sylius\Component\Core\Model\ProductInterface; |
| 8 | -use Sylius\Component\Core\Model\ProductVariantInterface; |
|
| 9 | 8 | use Sylius\Component\Core\Model\TaxonInterface; |
| 10 | -use Sylius\ShopApiPlugin\View\ProductVariantView; |
|
| 11 | 9 | use Sylius\ShopApiPlugin\View\ProductView; |
| 12 | 10 | |
| 13 | 11 | final class ProductViewFactory implements ProductViewFactoryInterface |