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

Document ApiClient magic methods with @method PHPDoc tag #7

Closed
rulatir opened this issue May 7, 2018 · 4 comments
Closed

Document ApiClient magic methods with @method PHPDoc tag #7

rulatir opened this issue May 7, 2018 · 4 comments

Comments

@rulatir
Copy link

rulatir commented May 7, 2018

I can see that examples show usages like $client->exportLocale(/* ... */);, but the ApiClient class does not define any such methods. This must mean that they are somehow translated to endpoint paths using __call() automagic.

Please document these magic methods using @method PHPDoc tags so that they will be available for code completion and won't trigger code inspection warnings in modern IDEs.

Alternatively return new static instead of new self in ApiClient::factory() so that one can subclass it and add the missing PHPDoc to the subclass.

@timwhitlock
Copy link
Member

timwhitlock commented May 8, 2018

Thanks for the suggestion. The service definition is completely auto-generated, so I will look into adding @method tags as part of that build process.

@timwhitlock
Copy link
Member

Hi. Would you mind checking out the master branch? I've added the code hints, but I'm "between IDEs" at the moment, so I can't see if they work.

@timwhitlock
Copy link
Member

https://github.com/loco/loco-php-sdk/releases/tag/2.0.1

@rulatir
Copy link
Author

rulatir commented May 21, 2018

Great, works like charm, thanks!

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

No branches or pull requests

2 participants