Kahlan\Plugin\Pointcut::_stubbedMethod PHP Method

_stubbedMethod() protected static method

Checks if the called method has been stubbed.
protected static _stubbedMethod ( string $lsb, object | string $self, string $class, string $name, string $args ) : boolean
$lsb string Late state binding class name.
$self object | string The object instance or a fully-namespaces class name.
$class string The class name.
$name string The method name.
$args string The passed arguments.
return boolean Returns `true` if the method has been stubbed.
    protected static function _stubbedMethod($lsb, $self, $class, $name, $args)
    {
        if (is_object($self)) {
            $list = $lsb === $class ? [$self, $lsb] : [$self, $lsb, $class];
        } else {
            $list = $lsb === $class ? [$lsb] : [$lsb, $class];
            $name = '::' . $name;
        }
        $stub = static::$_classes['stub'];
        $method = $stub::find($list, $name, $args);
        Calls::log($list, compact('name', 'args', 'method'));
        return $method ?: false;
    }