woocommerce / woocommerce/wc-api-php
Client return types are array not stdClass
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 546
- Forks
- 158
- Avg merge
- 3h 21m
- Merged PRs (30d)
- 2
Description
If I do a get call to the orders endpoint for example, it seems to return an array but the phpdoc says stdClass. The change that led to this documentation seems to have come in https://github.com/woocommerce/wc-api-php/pull/286
This gives us problems as phpstan reports errors based on the return type expected. Is the correct return type array or should it be returning an stdClass?
Contributor guide
No contributing guide indexed for this repository
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
Start with the client handling of GET requests to the orders endpoint and review the documentation change from pull request #286. Compare the returned value with its PHPDoc type and determine which type is correct; done when the documented return type matches the actual result and the phpstan errors are resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100