77use Setono \SyliusLagersystemPlugin \Factory \Address \AddressViewFactoryInterface ;
88use Setono \SyliusLagersystemPlugin \Factory \Customer \CustomerViewFactoryInterface ;
99use Setono \SyliusLagersystemPlugin \Factory \PaymentViewFactoryInterface ;
10- use Setono \SyliusLagersystemPlugin \Factory \ShipmentViewFactoryInterface ;
1110use Setono \SyliusLagersystemPlugin \View \Order \OrderView ;
1211use Sylius \Component \Core \Model \AdjustmentInterface ;
1312use Sylius \Component \Core \Model \CustomerInterface ;
1413use Sylius \Component \Core \Model \OrderInterface ;
1514use Sylius \Component \Core \Model \OrderItemInterface ;
1615use Sylius \Component \Core \Model \PaymentInterface ;
17- use Sylius \Component \Core \Model \ShipmentInterface ;
1816use Webmozart \Assert \Assert ;
1917
2018class OrderViewFactory implements OrderViewFactoryInterface
@@ -25,9 +23,6 @@ class OrderViewFactory implements OrderViewFactoryInterface
2523 /** @var AddressViewFactoryInterface */
2624 protected $ addressViewFactory ;
2725
28- /** @var ShipmentViewFactoryInterface */
29- protected $ shipmentViewFactory ;
30-
3126 /** @var PaymentViewFactoryInterface */
3227 protected $ paymentViewFactory ;
3328
@@ -43,15 +38,13 @@ class OrderViewFactory implements OrderViewFactoryInterface
4338 public function __construct (
4439 CustomerViewFactoryInterface $ customerViewFactory ,
4540 AddressViewFactoryInterface $ addressViewFactory ,
46- ShipmentViewFactoryInterface $ shipmentViewFactory ,
4741 PaymentViewFactoryInterface $ paymentViewFactory ,
4842 AdjustmentViewFactoryInterface $ adjustmentViewFactory ,
4943 ItemViewFactoryInterface $ itemFactory ,
5044 string $ orderViewClass
5145 ) {
5246 $ this ->customerViewFactory = $ customerViewFactory ;
5347 $ this ->addressViewFactory = $ addressViewFactory ;
54- $ this ->shipmentViewFactory = $ shipmentViewFactory ;
5548 $ this ->paymentViewFactory = $ paymentViewFactory ;
5649 $ this ->adjustmentViewFactory = $ adjustmentViewFactory ;
5750 $ this ->itemFactory = $ itemFactory ;
@@ -97,11 +90,6 @@ public function create(OrderInterface $order): OrderView
9790 );
9891 }
9992
100- /** @var ShipmentInterface $shipment */
101- foreach ($ order ->getShipments () as $ shipment ) {
102- $ orderView ->shipments [] = $ this ->shipmentViewFactory ->create ($ shipment , $ localeCode );
103- }
104-
10593 /** @var PaymentInterface $payment */
10694 foreach ($ order ->getPayments () as $ payment ) {
10795 $ orderView ->payments [] = $ this ->paymentViewFactory ->create ($ payment , $ localeCode );
0 commit comments