Fixed some psalm issues.

This commit is contained in:
Jan Böhmer 2020-03-29 23:13:25 +02:00
parent eb9b24d5d7
commit cb0aa7bc7a
32 changed files with 217 additions and 148 deletions

View file

@ -187,7 +187,7 @@ class EntityURLGenerator
throw new EntityNotSupportedException('The given entity is not supported yet!');
}
public function viewURL($entity): string
public function viewURL(Attachment $entity): ?string
{
if ($entity instanceof Attachment) {
if ($entity->isExternal()) { //For external attachments, return the link to external path
@ -201,7 +201,7 @@ class EntityURLGenerator
throw new EntityNotSupportedException('The given entity is not supported yet!');
}
public function downloadURL($entity): string
public function downloadURL($entity): ?string
{
if ($entity instanceof Attachment) {
if ($entity->isExternal()) { //For external attachments, return the link to external path