square / square/connect-api-specification

PHP SDK Contains Invalid DocBlocks Causing IDE-Errors

Open
#111 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.