public function getSignature($name)
    {
        $interface = new ReflectionClass($this->interface);
        $method = $interface->getMethod($name);

        $abstract = ($method->isAbstract() && ! $interface->isInterface() && ! $this->isAbstractMethodInParents($name)) ? 'abstract ' : '';

        if ($method->isPublic()) {
            $visibility = 'public';
        } elseif ($method->isProtected()) {
            $visibility = 'protected';
        } else {
            $visibility = 'private';
        }

        $static     = $method->isStatic() ? 'static ' : '';
        $reference  = $method->returnsReference() ? '&' : '';
        $params     = $this->getParameterSignatures($method);
        $returnType = $this->getReturnType($method); 

        return "{$abstract}$visibility {$static}function $reference$name($params){$returnType}";
    }
public function getSignature($name)
    {
        $interface = new ReflectionClass($this->interface);
        $method = $interface->getMethod($name);

        $abstract = ($method->isAbstract() && ! $interface->isInterface() && ! $this->isAbstractMethodInParents($name)) ? 'abstract ' : '';

        if ($method->isPublic()) {
            $visibility = 'public';
        } elseif ($method->isProtected()) {
            $visibility = 'protected';
        } else {
            $visibility = 'private';
        }

        $static     = $method->isStatic() ? 'static ' : '';
        $reference  = $method->returnsReference() ? '&' : '';
        $params     = $this->getParameterSignatures($method);
        $returnType = $this->getReturnType($method); 

        return "{$abstract}$visibility {$static}function $reference$name($params){$returnType}";
    }
Returns the source code matching the declaration of a method.

@param string $name    Method name.

@return string         Method signature up to last bracket.