-
Notifications
You must be signed in to change notification settings - Fork 63
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 1.12 #609
Conversation
preg_match('/<p>{{ DOCS_SOURCE_PATH : (.*) }}<\/p>/', $contents, $match); | ||
|
||
assert(count($match) === 2); |
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.
Asserting that the regex did actually match should also narrow the match array enough.
preg_match('/<p>{{ DOCS_SOURCE_PATH : (.*) }}<\/p>/', $contents, $match); | |
assert(count($match) === 2); | |
$result = preg_match('/<p>{{ DOCS_SOURCE_PATH : (.*) }}<\/p>/', $contents, $match); | |
assert($result === 1); |
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.
It does. I didn't expect that phpstan can work with the return value to handle the matches.
715e024
to
3e4ca60
Compare
It's 1.12, not 2.12. 🤓 |
3e4ca60
to
395f5e7
Compare
It was a PR from the future, but I downgraded the version to the one that is known to the current time. 😇 |
No description provided.