Skip to content

Fix error getting completions for 'new static' type #405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 15, 2017

Conversation

roblourens
Copy link
Contributor

classTypeDesignator can now also be a StaticKeyword, after microsoft/tolerant-php-parser#149

@codecov
Copy link

codecov bot commented Jun 13, 2017

Codecov Report

Merging #405 into master will not change coverage.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master     #405   +/-   ##
=========================================
  Coverage     84.24%   84.24%           
- Complexity      699      700    +1     
=========================================
  Files            54       54           
  Lines          1568     1568           
=========================================
  Hits           1321     1321           
  Misses          247      247
Impacted Files Coverage Δ Complexity Δ
src/DefinitionResolver.php 84.8% <100%> (ø) 263 <0> (+1) ⬆️

return new Types\Static_;
}
$className = (string)$class->getResolvedName();

if ($className === 'self' || $className === 'parent') {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can these be checked through TokenKind too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There aren't TokenKinds for self and parent. I don't know why. They are parsed as QualifiedNames.

@felixfbecker felixfbecker merged commit 3b63336 into felixfbecker:master Jun 15, 2017
lialan pushed a commit to lambdalab/php-language-server that referenced this pull request Oct 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants