method = $method; $this->interfaces = $interfaces; $this->name = $methodName ?: $method->name; $this->namespace = $class->getNamespaceName(); //Create a DocBlock and serializer instance $this->phpdoc = new DocBlock($method); //Normalize the description and inherit the docs from parents/interfaces try { $this->normalizeParams($this->phpdoc); $this->normalizeReturn($this->phpdoc); $this->normalizeDescription($this->phpdoc); } catch (\Exception $e) { } //Get the parameters, including formatted default values $this->getParameters($method); //Make the method static $this->phpdoc->appendTag(Tag::createInstance('@static', $this->phpdoc)); //Reference the 'real' function in the declaringclass $this->declaringClassName = '\\' . ltrim($class->name, '\\'); $this->root = '\\' . ltrim($class->getName(), '\\'); } }