Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added completion support to type hinted local variables. #701

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

Open
julianschwuchow wants to merge 1 commit into felixfbecker:master
base: master
Choose a base branch
Loading
from julianschwuchow:master

Conversation

@julianschwuchow
Copy link

@julianschwuchow julianschwuchow commented Jan 25, 2019
edited by felixfbecker
Loading

Closes #350

$declarationNode =
ParserHelpers\tryGetPropertyDeclaration($expr) ??
ParserHelpers\tryGetConstOrClassConstDeclaration($expr);
$declarationNode = $declarationNode ?? $expr;
Copy link
Owner

@felixfbecker felixfbecker Jan 25, 2019

Choose a reason for hiding this comment

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

The double assignments reads very weird - just chain the ?? together

$declarationNode =
 ParserHelpers\tryGetPropertyDeclaration($expr) ??
 ParserHelpers\tryGetConstOrClassConstDeclaration($expr) ??
 $expr;

Copy link
Owner

@felixfbecker felixfbecker left a comment

Choose a reason for hiding this comment

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

LGTM otherwise

Copy link
Owner

Could you add a unit test for this? Otherwise it's prone to break through future changes

Copy link

codecov bot commented Jan 25, 2019
edited by ghost
Loading

Codecov Report

Merging #701 into master will increase coverage by 0.01%.
The diff coverage is 85.71%.

@@ Coverage Diff @@
## master #701 +/- ##
============================================
+ Coverage 82.17% 82.18% +0.01% 
- Complexity 935 938 +3 
============================================
 Files 44 44 
 Lines 2154 2161 +7 
============================================
+ Hits 1770 1776 +6 
- Misses 384 385 +1
Impacted Files Coverage Δ Complexity Δ
src/DefinitionResolver.php 87.43% <85.71%> (-0.03%) 335 <0> (+3)
DanNYSPD reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@felixfbecker felixfbecker felixfbecker left review comments

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /