mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 10:24:31 +02:00
Fixed phpunit tests
This commit is contained in:
parent
d898ca736c
commit
5074e2beac
3 changed files with 4 additions and 5 deletions
|
@ -477,7 +477,8 @@ abstract class Attachment extends AbstractNamedDBElement
|
|||
*/
|
||||
public function setElement(AttachmentContainingDBElement $element): self
|
||||
{
|
||||
if (!$element instanceof AttachmentContainingDBElement) {
|
||||
//Do not allow Rector to replace this check with a instanceof. It will not work!!
|
||||
if (!is_a($element, static::ALLOWED_ELEMENT_CLASS, true)) {
|
||||
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