Pricing/EventListener/TaxGroupListener.php
protected function getTaxGroupFromEvent(ResourceEventInterface $event)
    {
        $resource = $event->getResource();

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

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

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

        return $resource;
    }
Returns the tax group from the event.

@param ResourceEventInterface $event

@return TaxGroupInterface
@throws InvalidArgumentException