Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix phpdoc #186

Closed
wants to merge 1 commit into from
Closed

Fix phpdoc #186

wants to merge 1 commit into from

Conversation

VincentLanglet
Copy link

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 => #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
Copy link
Author

Hi @KarmanLeung, since you recently merged a PR on this lib, maybe could you help me about this one ?

Thanks

@KarmanLeung
Copy link
Contributor

Hi @VincentLanglet, thanks for raising the issues around the phpdocs. I have updated this in the crank template and published the changes you proposed in #186 #187 #188 in the latest release v15.11.0.

@VincentLanglet
Copy link
Author

Hi @VincentLanglet, thanks for raising the issues around the phpdocs. I have updated this in the crank template and published the changes you proposed in #186 #187 #188 in the latest release v15.11.0.

Thanks a lot !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants