Skip to content

getExpirationDate method of IShare might return null #33047

Open
@jvillafanez

Description

@jvillafanez

Public IShare interface (OCP\Share\IShare) has method getExpirationDate which should return a \DateTime object. However, the share2.0 implementation might not return this kind of object.

  • It might return null if the expiration date is not set.
  • It might return any other object (not just \DateTime) if such object is set via the setExpirationDate method (no type check used in the method).

This is currently messing up with phpstan configuration, because checking if the expiration date is null is almost mandatory.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions