Skip to content
This repository has been archived by the owner on Feb 16, 2019. It is now read-only.

Commit

Permalink
bug #274 Adds $this hint support (TheRealDarklord)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.0-dev branch.

Discussion
----------

Adds $this hint support

PR for issue FriendsOfPHP/Sami#273

Commits
-------

8590c01 Add $this as class name alias for hints
  • Loading branch information
fabpot committed Apr 18, 2017
2 parents af1155c + 8590c01 commit fb577ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sami/Parser/NodeVisitor.php
Expand Up @@ -314,7 +314,7 @@ protected function resolveAlias($alias)
$class = $this->context->getClass();

// special aliases
if ('self' === $alias || 'static' === $alias) {
if ('self' === $alias || 'static' === $alias || '\$this' === $alias) {
return $class->getName();
}

Expand Down

0 comments on commit fb577ae

Please sign in to comment.