Skip to content

Conversation

@justlevine
Copy link
Collaborator

@justlevine justlevine commented Apr 19, 2025

What does this implement/fix? Explain your changes.

This PR implements a reusable PHPStan array shape for the AdminNotices class, removing all unintentional uses for mixed. (mixed is still used for the filter, so it can be validated).

As a result of this change, PHPStan caught (and this fixes) the incorrect validation of the filtered notice.

There are no breaking changes in this PR.

Any other comments?

LLMs + IDEs + Extenders all really like shaped arrays. This is the first PR of hopefully many getting rid of the mixed type however possible.

@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit 2764b8d and detected 0 issues on this pull request.

View more on Code Climate.

@coveralls
Copy link

Coverage Status

coverage: 82.607%. remained the same
when pulling 2764b8d on justlevine:chore/AdminNotices-array-shapes
into b82f17c on wp-graphql:develop.

@justlevine justlevine added status: in review Awaiting review before merging or closing needs: reviewer response This needs the attention of a codeowner or maintainer type: chore Maintenance tasks, refactoring, and other non-functional changes labels Apr 19, 2025
@justlevine justlevine requested a review from jasonbahl April 19, 2025 18:37
@jasonbahl jasonbahl merged commit c86f3af into wp-graphql:develop Apr 22, 2025
35 checks passed
@justlevine justlevine deleted the chore/AdminNotices-array-shapes branch April 22, 2025 19:09
jasonbahl pushed a commit to justlevine/wp-graphql that referenced this pull request Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs: reviewer response This needs the attention of a codeowner or maintainer status: in review Awaiting review before merging or closing type: chore Maintenance tasks, refactoring, and other non-functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants