-
Notifications
You must be signed in to change notification settings - Fork 384
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
Raise PHPStan level to 4 in lib/optimizer #4685
Conversation
if (200 < $statusCode || $statusCode >= 300) { | ||
if ($statusCode < 200 || $statusCode >= 300) { |
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.
Yes again, a good candidate for backporting.
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.
Note, the changes are all in separate commits, so backporting the above should be a straight-forward cherry-pick.
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 branch doesn't merge cleanly into 1.5, and 83018f2 doesn't merge cleanly either. But I'll apply this one fix manually, and leave the other changes to 1.6 alone.
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.
See f9f10d1.
Co-authored-by: Weston Ruter <westonruter@google.com>
…-phpstan-to-level-4 * 'develop' of github.com:ampproject/amp-wp: Update dependency @wordpress/scripts to v9.1.0 Update dependency @wordpress/jest-puppeteer-axe to v1.8.0 Update dependency @wordpress/url to v2.15.0 Update dependency @wordpress/plugins to v2.16.0 Raise PHPStan level to 4 in lib/common (#4686) Update dependency uuid to v8 Update dependency webpack to v4.43.0 Update dependency eslint-plugin-jest to v23.11.0 Update dependency eslint-plugin-react to v7.20.0 (#4691) Update dependency postcss to v7.0.30 (#4649) Update dependency moment to v2.25.3 (#4639) Update dependency babel-jest to v26 (#4652) Update dependency uuid to v7.0.3 (#4490) Update dependency wp-coding-standards/wpcs to v2.3.0 (#4721) Update dependency @wordpress/e2e-test-utils to v4.7.0 Suppress Site Health ICU test if site or home URL is not an IDN (#4698) Pin amp-experiment to v0.1 (#4690) Disable share icons Use amp-embedly-card for Tiktok embeds Update dependency terser-webpack-plugin to v2.3.6
Travis build does pass but it is not being reported here. See https://travis-ci.org/github/ampproject/amp-wp/builds/687604455 |
I am assuming that this (and related) PRs were tested in CI properly. No further QA needed. |
Summary
This PR fixes the following issues that PHPStan detected at level 4:
Fixes #4380
Checklist