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

\Google\Service\Calendar\Event::getDescription() returns NULL instead of "" #2682

Open
marios88 opened this issue Apr 19, 2023 · 3 comments
Open
Assignees
Labels
type: question Request for information or clarification. Not an issue.

Comments

@marios88
Copy link

Environment details

  • OS: Linux
  • PHP version: 8.1.17
  • Package name and version: google/apiclient:2.13.2

Steps to reproduce

  1. Get any event from calendar api that has an empty description

Code example

/** @var \Google_Service_Calendar_Event $event */
var_dump($event->getDescription() === null);

public function getDescription()

@bshaffer
Copy link
Contributor

Hello. This is probably working as designed. Do you think it should return string because the parameter type in phpdoc is string instead of string|null? Because this may be an issue. But I believe if the API was returning an empty string, this method would also.

@saranshdhingra saranshdhingra added the type: question Request for information or clarification. Not an issue. label Jul 4, 2023
@yash30201
Copy link
Contributor

Closing as this seems answered. Please feel free to reopen if your still have any query.

@marios88
Copy link
Author

@bshaffer Sorry for the late reply, yes i think that the phpdoc for getDescription & setDescription should be string|null since IDEs and static analysis falsely reports that getDescription returns string

@yash30201 yash30201 reopened this Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

4 participants