Kahlan\Plugin\Double::_generateAbstractMethods PHP Method

_generateAbstractMethods() protected static method

Creates method definitions from a class name.
protected static _generateAbstractMethods ( string $class ) : string
$class string A class name.
return string The generated methods.
    protected static function _generateAbstractMethods($class)
    {
        $result = [];
        if (!class_exists($class)) {
            throw new MissingImplementationException("Unexisting parent class `{$class}`");
        }
        $reflection = Inspector::inspect($class);
        $methods = $reflection->getMethods(ReflectionMethod::IS_ABSTRACT);
        foreach ($methods as $method) {
            $result[$method->getName()] = static::_generateMethod($method);
        }
        return $result;
    }