public function verifyClassMethod(Dispatch $dispatch): void
    {
        // If a class and method are set and not callable
        if (
            null !== $dispatch->getClass()
            && null !== $dispatch->getMethod()
            && ! method_exists(
                $dispatch->getClass(),
                $dispatch->getMethod()
            )
        ) {
            // Throw a new invalid method exception
            throw new InvalidMethodException(
                'Method does not exist in class : '
                . $dispatch->getName() . ' '
                . $dispatch->getClass()
                . '@'
                . $dispatch->getMethod()
            );
        }
    }
public function verifyClassMethod(Dispatch $dispatch): void
    {
        // If a class and method are set and not callable
        if (
            null !== $dispatch->getClass()
            && null !== $dispatch->getMethod()
            && ! method_exists(
                $dispatch->getClass(),
                $dispatch->getMethod()
            )
        ) {
            // Throw a new invalid method exception
            throw new InvalidMethodException(
                'Method does not exist in class : '
                . $dispatch->getName() . ' '
                . $dispatch->getClass()
                . '@'
                . $dispatch->getMethod()
            );
        }
    }
public function verifyClassMethod ( Dispatch $ dispatch ) : void { // If a class and method are set and not callable if ( null !== $ dispatch -> getClass ( ) && null !== $ dispatch -> getMethod ( ) && ! method_exists ( $ dispatch -> getClass ( ) , $ dispatch -> getMethod ( ) ) ) { // Throw a new invalid method exception throw new InvalidMethodException ( 'Method does not exist in class : ' . $ dispatch -> getName ( ) . ' ' . $ dispatch -> getClass ( ) . '@' . $ dispatch -> getMethod ( ) ) ; } }
Verify the class and method of a dispatch.

@param Dispatch $dispatch The dispatch

@throws \Valkyrja\Dispatcher\Exceptions\InvalidMethodException

@return void
Verify the class and method of a dispatch .