-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Update phpstan to 0.10.8 #110
Conversation
44bc8c8
to
7945112
Compare
@@ -37,7 +37,7 @@ public function __construct(WordInflector $singularizer, WordInflector $pluraliz | |||
*/ | |||
public function tableize(string $word) : string | |||
{ | |||
return mb_strtolower(preg_replace('~(?<=\\w)([A-Z])~u', '_$1', $word)); | |||
return mb_strtolower((string) preg_replace('~(?<=\\w)([A-Z])~u', '_$1', $word)); |
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.
These changes are not valid, it hides the error instead of reacting on it.
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.
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 started to throw exceptions when preg_replace returns null but it got so complicated so quick in some areas where we chain multiple preg_replace calls together. I'll work on it in #115
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.
Also, do you know in what scenarios preg_replace would return null?
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.
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.
There is also https://github.com/thecodingmachine/safe not related, bad thought
Also changed
level
tomax
in configuration.