Skip to content

Support for null returns #2339

@jdelaune

Description

@jdelaune

I would be useful for the models to have null return types where needed as otherwise we need to add phpstan overrides in our code. An example being Google\Service\Calendar\Event->getOrganizer() which says it always returns an EventOrganizer when it can also return null.

Describe the solution you'd like

For the return to be marked as null e.g.

  /**
   * @return EventOrganizer|null
   */
  public function getOrganizer()
  {
    return $this->organizer;
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions