public function getDisplayName(): ?string
{
return (string)$this->getSharingLink()->getAtLibreGraphDisplayName();
}
This method always returns a string, but is declared to return ?string
I noticed this when doing PR #217 to tidy up unit tests. When a test case sets the display name to null and then gets the display name, the empty string is returned.
https://github.com/owncloud/ocis-php-sdk/blob/main/src/ShareLink.php
This method always returns a string, but is declared to return
?string
I noticed this when doing PR #217 to tidy up unit tests. When a test case sets the display name to
null
and then gets the display name, the empty string is returned.Should we remove the
?
from?string
?