/**
  * @param CommandBusFactory $commandBusFactory
  * @param EventLog $eventLog
  * @return CommandBus
  */
 protected function createCommandBus(CommandBusFactory $commandBusFactory, EventLog $eventLog, array $commandExtension = []) : CommandBus
 {
     return $commandBusFactory->create([CreateProduct::class => new CreateProductHandler($this->products), PutBackProductToStock::class => new PutBackProductToStockHandler($this->products), RemoveProductFromStock::class => new RemoveProductFromStockHandler($this->products)], $commandExtension);
 }
 /**
  * @param CommandBusFactory $commandBusFactory
  * @param array $commandExtensions
  * @return CommandBus
  */
 protected function createCommandBus(CommandBusFactory $commandBusFactory, array $commandExtensions = []) : CommandBus
 {
     return $commandBusFactory->create([AcceptOrder::class => new AcceptOrderHandler($this->orders), CreatePayment::class => new CreatePaymentHandler($this->orders, $this->payments), PayPayment::class => new PayPaymentHandler($this->payments), RejectPayment::class => new RejectPaymentHandler($this->payments), PrepareOrder::class => new PrepareOrderHandler($this->orders), RefundOrder::class => new RefundOrderHandler($this->orders), RejectOrder::class => new RejectOrderHandler($this->orders), SendOrder::class => new SendOrderHandler($this->orders)], $commandExtensions);
 }
 /**
  * @param EventLog $eventLog
  * @param CommandBusFactory $commandBusFactory
  * @param array $commandExtension
  * @return CommandBus
  */
 protected function createCommandBus(EventLog $eventLog, CommandBusFactory $commandBusFactory, array $commandExtension = []) : CommandBus
 {
     return $commandBusFactory->create([AddToCart::class => new AddToCartHandler($this->products, $this->carts), ChangeBillingAddress::class => new ChangeBillingAddressHandler($this->checkouts), ChangeShippingAddress::class => new ChangeShippingAddressHandler($this->checkouts), CreateCart::class => new CreateCartHandler($this->carts), NewCheckout::class => new NewCheckoutHandler($this->checkouts, $this->carts), PlaceOrder::class => new PlaceOrderHandler($this->carts, $this->products, $this->checkouts, $this->orders, $eventLog), RemoveFromCart::class => new RemoveFromCartHandler($this->carts)], $commandExtension);
 }