@@ -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 | |
@@ -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; |
@@ -70,8 +70,7 @@ |
||
| 70 | 70 | /** @var PromotionCouponInterface $coupon */ |
| 71 | 71 | $coupon = $this->promotionCouponRepository->findOneBy(['code' => $command->couponCode()]); |
| 72 | 72 | |
| 73 | - if (null === $coupon || !$this->couponEligibilityChecker->isEligible($cart, $coupon)) |
|
| 74 | - { |
|
| 73 | + if (null === $coupon || !$this->couponEligibilityChecker->isEligible($cart, $coupon)) { |
|
| 75 | 74 | $this->buildViolation($constraint); |
| 76 | 75 | |
| 77 | 76 | return; |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sylius\ShopApiPlugin\Factory; |
| 6 | 6 | |
@@ -82,6 +82,9 @@ |
||
| 82 | 82 | return $productView; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | + /** |
|
| 86 | + * @param string $locale |
|
| 87 | + */ |
|
| 85 | 88 | private function getTaxonWithAncestors(TaxonInterface $taxon, $locale): TaxonView |
| 86 | 89 | { |
| 87 | 90 | $currentTaxonView = $this->taxonViewFactory->create($taxon, $locale); |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sylius\ShopApiPlugin\Factory; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sylius\ShopApiPlugin\Factory; |
| 6 | 6 | |
@@ -24,7 +24,8 @@ |
||
| 24 | 24 | /** |
| 25 | 25 | * @param CommandBus $bus |
| 26 | 26 | */ |
| 27 | - public function __construct(CommandBus $bus) { |
|
| 27 | + public function __construct(CommandBus $bus) |
|
| 28 | + { |
|
| 28 | 29 | $this->bus = $bus; |
| 29 | 30 | } |
| 30 | 31 | |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | use Sylius\Component\Core\Repository\ProductRepositoryInterface; |
| 10 | 10 | use Sylius\Component\Core\Repository\ProductReviewRepositoryInterface; |
| 11 | 11 | use Sylius\Component\Review\Factory\ReviewFactoryInterface; |
| 12 | -use Sylius\Component\Review\Model\ReviewInterface; |
|
| 13 | 12 | use Sylius\ShopApiPlugin\Command\AddReview; |
| 14 | 13 | use Sylius\ShopApiPlugin\Provider\ProductReviewerProviderInterface; |
| 15 | 14 | use Webmozart\Assert\Assert; |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | public function provide(string $email): CustomerInterface |
| 30 | 30 | { |
| 31 | - $customer = $this->customerRepository->findOneBy(['email' => $email]); |
|
| 31 | + $customer = $this->customerRepository->findOneBy(['email' => $email]); |
|
| 32 | 32 | |
| 33 | 33 | if (null === $customer) { |
| 34 | 34 | /** @var CustomerInterface $customer */ |