-
Notifications
You must be signed in to change notification settings - Fork 185
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
Added completion support to type hinted local variables. #701
base: master
Are you sure you want to change the base?
Conversation
$declarationNode = | ||
ParserHelpers\tryGetPropertyDeclaration($expr) ?? | ||
ParserHelpers\tryGetConstOrClassConstDeclaration($expr); | ||
$declarationNode = $declarationNode ?? $expr; |
There was a problem hiding this comment.
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;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise
Could you add a unit test for this? Otherwise it's prone to break through future changes |
Codecov Report
@@ 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
|
Closes #350