mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-02 22:44:33 +02:00
Applied rector suggestions
This commit is contained in:
parent
4106bcef5f
commit
20f32c7f12
170 changed files with 808 additions and 761 deletions
|
@ -385,7 +385,7 @@ abstract class Attachment extends AbstractNamedDBElement
|
|||
return null;
|
||||
}
|
||||
|
||||
return parse_url($this->getURL(), PHP_URL_HOST);
|
||||
return parse_url((string) $this->getURL(), PHP_URL_HOST);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -477,7 +477,7 @@ abstract class Attachment extends AbstractNamedDBElement
|
|||
*/
|
||||
public function setElement(AttachmentContainingDBElement $element): self
|
||||
{
|
||||
if (!is_a($element, static::ALLOWED_ELEMENT_CLASS)) {
|
||||
if (!$element instanceof AttachmentContainingDBElement) {
|
||||
throw new InvalidArgumentException(sprintf('The element associated with a %s must be a %s!', static::class, static::ALLOWED_ELEMENT_CLASS));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue