gocardless-pro-php icon indicating copy to clipboard operation
gocardless-pro-php copied to clipboard

Fix phpdoc

Open VincentLanglet opened this issue 1 month ago • 0 comments

Hi,

This PR is doing multiple fixes:

  1. Both
array[string][mixed] 
string[mixed]

are not valid PHPdoc and it reports error when using an IDE or a static-analysis tool like PHPStan array<string, mixed> is the correct format.

Related issue => https://github.com/gocardless/gocardless-pro-php/issues/134

  1. @method are not used correctly.

Cf https://docs.phpdoc.org/3.0/guide/references/phpdoc/tags/method.html

  • The method tag is only used to add extra method which are generated by the __call method, so things like
 * @method create()
 * @method get()

is incorrect since those method are fully implemented in the classes.

  • The method tag should precise the params and the return type, so things like
 * @method list()

is wrong, it should be

 * @method ListResponse list(array $params)

All of these changed are in files with the following warning

WARNING: Do not edit by hand, this file was generated by Crank:

but I do not have access in the https://github.com/gocardless/crank

Can anyone help me on this @barrucadu @Nimisoere @opsz2 @NickLewry ?

VincentLanglet avatar May 07 '24 13:05 VincentLanglet