src/Valkyrja/Dispatcher/NativeDispatcher.php
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()
            );
        }
    }
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()
            );
        }
    }
Verify the function of a dispatch.

@param Dispatch $dispatch The dispatch

@throws \Valkyrja\Dispatcher\Exceptions\InvalidFunctionException

@return void