square / square/connect-api-specification
PHP SDK Contains Invalid DocBlocks Causing IDE-Errors
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 76
- Forks
- 36
- Avg merge
- 3h 14m
- Merged PRs (30d)
- 1
Description
Hey all, the V1 api classes in the PHP SDK all have the method list{model}ithHttpInfo, whose docblock contains the following return declaration:
/**
* @return Array of \SquareConnect\Model\V1Item[], HTTP status code, HTTP response headers (array of strings)
*/
This is invalid syntax and is telling static-analysis tools/PHPStorm that the return type of this method is SquareConnect\Api\Array, causing all sorts of issues. Can these docblocks be updated to the valid form please? Example below:
/**
* @return array Array of \SquareConnect\Model\V1Item[], HTTP status code, HTTP response headers (array of strings)
*/
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
Inspect the Mustache templates that generate the PHP SDK's V1 API classes and locate the docblock for the list{model}ithHttpInfo methods. Update the return declaration to use the valid array form, then regenerate or inspect the affected PHP classes and confirm IDE/static-analysis tools no longer interpret the return type as SquareConnect\Api\Array.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- developer-experience
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100