Skip to content

Commit

Permalink
Add support for @return $this phpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
halftan committed Jan 9, 2017
1 parent a926bb6 commit 4b5594f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Padawan/Domain/Project/Node/ClassData.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ public function addInterface($interface)
}
public function addMethod(MethodData $method)
{
if ($method->return instanceof FQCN) {
if ($method->return->getLast() === 'this') {
$method->return = $this->fqcn;
}
}
$this->methods->add($method);
}
public function getMethod($methodName)
Expand Down

0 comments on commit 4b5594f

Please sign in to comment.