public function verifyDispatch(Dispatch $dispatch): void
    {
        // If a function, closure, and class or method are not set
        if (
            null === $dispatch->getFunction()
            && null === $dispatch->getClosure()
            && null === $dispatch->getClass()
            && null === $dispatch->getMethod()
            && null === $dispatch->getProperty()

        ) {
            // Throw a new invalid dispatch capability exception
            throw new InvalidDispatchCapabilityException(
                'Dispatch capability is not valid for : '
                . $dispatch->getName()
            );
        }

        $this->verifyClassMethod($dispatch);
        $this->verifyClassProperty($dispatch);
        $this->verifyFunction($dispatch);
        $this->verifyClosure($dispatch);
    }
public function verifyDispatch(Dispatch $dispatch): void
    {
        // If a function, closure, and class or method are not set
        if (
            null === $dispatch->getFunction()
            && null === $dispatch->getClosure()
            && null === $dispatch->getClass()
            && null === $dispatch->getMethod()
            && null === $dispatch->getProperty()

        ) {
            // Throw a new invalid dispatch capability exception
            throw new InvalidDispatchCapabilityException(
                'Dispatch capability is not valid for : '
                . $dispatch->getName()
            );
        }

        $this->verifyClassMethod($dispatch);
        $this->verifyClassProperty($dispatch);
        $this->verifyFunction($dispatch);
        $this->verifyClosure($dispatch);
    }
public function verifyDispatch ( Dispatch $ dispatch ) : void { // If a function, closure, and class or method are not set if ( null === $ dispatch -> getFunction ( ) && null === $ dispatch -> getClosure ( ) && null === $ dispatch -> getClass ( ) && null === $ dispatch -> getMethod ( ) && null === $ dispatch -> getProperty ( ) ) { // Throw a new invalid dispatch capability exception throw new InvalidDispatchCapabilityException ( 'Dispatch capability is not valid for : ' . $ dispatch -> getName ( ) ) ; } $ this -> verifyClassMethod ( $ dispatch ) ; $ this -> verifyClassProperty ( $ dispatch ) ; $ this -> verifyFunction ( $ dispatch ) ; $ this -> verifyClosure ( $ dispatch ) ; }
Verify the dispatch's dispatch capabilities.

@param Dispatch $dispatch The dispatch

@throws \Valkyrja\Dispatcher\Exceptions\InvalidClosureException
@throws \Valkyrja\Dispatcher\Exceptions\InvalidDispatchCapabilityException
@throws \Valkyrja\Dispatcher\Exceptions\InvalidFunctionException
@throws \Valkyrja\Dispatcher\Exceptions\InvalidMethodException
@throws \Valkyrja\Dispatcher\Exceptions\InvalidPropertyException

@return void
Verify the dispatch s dispatch capabilities .