-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Fixing phpdoc for Resource::call method return type #2113
Fixing phpdoc for Resource::call method return type #2113
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
@amackiewicz This looks great, although I'm not sure when it would return |
Hey @bshaffer ! well, me too :) but REST::execute phpdoc saying that it could return array (https://github.com/googleapis/google-api-php-client/blob/master/src/Http/REST.php#L44). |
any updates here @bshaffer ? :) |
Found that issue by the way of using Google_Service_Drive->files->export.
Files::export calling Resource::call and returning its output. In normal circumstances it returns psr ResponseInterface, just in some cases (when request is defered) it returns RequestInterface.
Current @return in Resource::call method has 2 issues:
ERROR: TypeError: Return value of Foxstone\BackendPHP\service\GoogleDriveService::exportFileContents() must be an instance of GuzzleHttp\Psr7\Request, instance of GuzzleHttp\Psr7\Response returned
Example of generated code (type returns by exportFileContents method was inherited from types returns from File::export (and then from Resource::call) which is wrong):