public function verifyFunction(Dispatch $dispatch): void
    {
        // If a function is set and is not callable
        if (
            null !== $dispatch->getFunction()
            && ! \is_callable($dispatch->getFunction())
        ) {
            // Throw a new invalid function exception
            throw new InvalidFunctionException(
                'Function is not callable for : '
                . $dispatch->getName() . ' '
                . $dispatch->getFunction()
            );
        }
    }