private function prepareEvent(OrderItemEvent $event)
    {
        if (!$event->hasItem()) {
            if (!$event->hasSubject()) {
                throw new LogicException('At least the item or the subject must be set.');
            }
            $event->setItem($this->helper->transform($event->getSubject()));
        }
    }
private function prepareEvent(OrderItemEvent $event)
    {
        if (!$event->hasItem()) {
            if (!$event->hasSubject()) {
                throw new LogicException('At least the item or the subject must be set.');
            }
            $event->setItem($this->helper->transform($event->getSubject()));
        }
    }
private function prepareEvent ( OrderItemEvent $ event ) { if ( ! $ event -> hasItem ( ) ) { if ( ! $ event -> hasSubject ( ) ) { throw new LogicException ( 'At least the item or the subject must be set.' ) ; } $ event -> setItem ( $ this -> helper -> transform ( $ event -> getSubject ( ) ) ) ; } }
Prepares the event by transforming the subject if needed.

@param OrderItemEvent $event
@throws LogicException
Prepares the event by transforming the subject if needed .