-
-
Notifications
You must be signed in to change notification settings - Fork 110
Added null check #245
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 null check #245
Conversation
| if ($list->offsetGet($list->idx)->type === Token::TYPE_DELIMITER) { | ||
| --$list->idx; | ||
| if ($class !== null) { | ||
| if ((new $class()) instanceof FunctionCall) { |
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.
I guess this could be simplified using is_a() so we would not need to create a object just to check for its class
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.
@staabm I think I'll merge this now to fix the current errors, and if you have time and a desire to modify the code to use is_a() instead, that would be a big benefit. Since we can implement the is_a() method in more places than just this one, I think it makes more sense to merge this and then make modifications. Sound good?
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.
sure, Please go ahead
|
//cc @ibennetch |
|
That sure looks like it fixes it! I'll let the whole Travis suite finish running first, but this works correctly on my local system. Nice work. |
Codecov Report
@@ Coverage Diff @@
## master #245 +/- ##
=========================================
Coverage ? 99.58%
Complexity ? 1854
=========================================
Files ? 62
Lines ? 4127
Branches ? 0
=========================================
Hits ? 4110
Misses ? 17
Partials ? 0 |
devenbansod
left a comment
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 👍
a shot in the dark to fix:
#224 (comment)