WordPress / WordPress/Requests
Review parameter type declarations
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 500
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 5
Description
While looking at something different, we noticed a number of places where parameters did not have (non-scalar) type declarations, while they could have.
It would probably be a good idea to do a review of the complete codebase to add object-based/array type declarations wherever possible.
This would not be a breaking change as overloading methods not having a type declaration, means those are declared as mixed and mixed is contravariant with any type, so this would not lead to signature mismatch errors.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the complete codebase for parameters without non-scalar type declarations, focusing on places where object-based or array declarations are possible. Done means adding compatible declarations wherever appropriate while preserving the stated non-breaking behavior; no specific files or tests are named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100