Customer/EventListener/CustomerAddressListener.php
protected function getAddressFromEvent(ResourceEventInterface $event)
    {
        $resource = $event->getResource();

        if (!$resource instanceof CustomerAddressInterface) {
            throw new InvalidArgumentException('Expected instance of ' . CustomerAddressInterface::class);
        }

        return $resource;
    }
protected function getAddressFromEvent(ResourceEventInterface $event)
    {
        $resource = $event->getResource();

        if (!$resource instanceof CustomerAddressInterface) {
            throw new InvalidArgumentException('Expected instance of ' . CustomerAddressInterface::class);
        }

        return $resource;
    }
protected function getAddressFromEvent ( ResourceEventInterface $ event ) { $ resource = $ event -> getResource ( ) ; if ( ! $ resource instanceof CustomerAddressInterface ) { throw new InvalidArgumentException ( 'Expected instance of ' . CustomerAddressInterface :: class ) ; } return $ resource ; }
Returns the address from the event.

@param ResourceEventInterface $event

@return CustomerAddressInterface
@throws InvalidArgumentException
Returns the address from the event .