mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-08 12:15:02 +02:00
Fixed some psalm issues.
This commit is contained in:
parent
eb9b24d5d7
commit
cb0aa7bc7a
32 changed files with 217 additions and 148 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue