You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve PHPDoc to (generated?) models to increase usability #172
The proper return type would probably suggest an array / collection, so @return Google_Service_Calendar_Event[] would be better: suggest it is iterable.
Currently my IDE (PHPStorm) still needs an explicit typehint:
Describe the solution you'd like
Indicate cardinality in PHPDoc return types
Describe alternatives you've considered
Using typehints in userland code can used as workaround, but this is quite error-prone and not very "intelligent"...
Reacted by Nico Haase, Ruslan Kostikov and Breno Ribeiro
Same here, PHPStan complains that \Google_Service_Calendar_Event::getAttendees returns an array of attendees instead of a single instance of Google_Service_Calendar_EventAttendee as given in the docblock
@dwsupplee and @jdpedrie is this somewhere on a roadmap / your radar? Seems "low hanging fruit" to me (of course, no idea whether that is the case, might be way more complex than I think...)
Typings of \Google_Service_Analytics_Webproperties::getItems and \Google_Service_Analytics_Webproperties::setItems are incorrect too, they should use Google_Service_Analytics_Webproperty[], not Google_Service_Analytics_Webproperty.
Activity
NicoHaase commentedon Jul 2, 2019
Same here, PHPStan complains that
\Google_Service_Calendar_Event::getAttendeesreturns an array of attendees instead of a single instance ofGoogle_Service_Calendar_EventAttendeeas given in the docblockholtkamp commentedon Sep 9, 2019
@dwsupplee and @jdpedrie is this somewhere on a roadmap / your radar? Seems "low hanging fruit" to me (of course, no idea whether that is the case, might be way more complex than I think...)
dwsupplee commentedon Sep 9, 2019
@holtkamp thanks for the ping. It is indeed! We've got a handful of changes we are working on batching up together in our code generator.
dwsupplee commentedon Jan 17, 2020
I just wanted to raise awareness this is still on our radar, and thank everyone for their patience.
Kocal commentedon Feb 21, 2020
Typings of
\Google_Service_Analytics_Webproperties::getItemsand\Google_Service_Analytics_Webproperties::setItemsare incorrect too, they should useGoogle_Service_Analytics_Webproperty[], notGoogle_Service_Analytics_Webproperty.holtkamp commentedon Mar 30, 2020
@dwsupplee thanks for #172 (comment) and letting us know this is still on the radar
Just wanted to point out that the original issue was submitted in August 2016...
Maybe it might be a nice challenge to wrap up before / around August 2020? 😇
holtkamp commentedon Jun 20, 2021
I suppose with https://github.com/googleapis/google-api-php-client-services/releases/tag/v0.200.0 this issue has been resolved => close issue 🥳