Skip to content
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 3 for AmpProject\AmpWP #4732

Merged
merged 18 commits into from
May 16, 2020

Conversation

schlessera
Copy link
Collaborator

@schlessera schlessera commented May 15, 2020

Summary

This PR does the following:

  • Raises level of PHPStan checks to 3
  • Fixes lots of type-hints
  • Changes some return values so they match their respective signature
  • Unsets a callback to avoid using a nullable type
  • Sets textContent to an empty string instead of null to adhere to the DOM specification (converted bts anyway)

Fixes #4377

Checklist

  • My pull request is addressing an open issue (please create one otherwise).
  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

@googlebot googlebot added the cla: yes Signed the Google CLA label May 15, 2020
@schlessera schlessera mentioned this pull request May 15, 2020
3 tasks
@westonruter westonruter self-requested a review May 15, 2020 23:03
…e-phpstan-level-3

* 'develop' of github.com:ampproject/amp-wp:
  Update dependency @wordpress/scripts to v9.1.0
  Remove redundant subtraction
  Update dependency @wordpress/e2e-test-utils to v4.7.0
  Fix bug with status code comparison
  Remove unneeded check for null as DOMElement is enforced
  Fix bug with comparing floats in ServerSideRendering
  Fix bug in Reorderhead with checking against empty nodelist
  Bump PHP Stan level to 4
@westonruter westonruter merged commit a0ef87c into develop May 16, 2020
@westonruter westonruter deleted the 4377-raise-phpstan-level-3 branch May 16, 2020 20:18
@westonruter westonruter added this to the v1.6 milestone Jun 2, 2020
@westonruter westonruter added the Changelogged Whether the issue/PR has been added to release notes. label Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelogged Whether the issue/PR has been added to release notes. cla: yes Signed the Google CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Raise PHPStan level for the AmpProject\AmpWP package to 3
4 participants