mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-30 13:34:28 +02:00
Fixed PHPstan issues for level 5.
This commit is contained in:
parent
a9293b7ceb
commit
da72f5b3ec
24 changed files with 87 additions and 49 deletions
|
@ -57,7 +57,7 @@ class EntityColumn extends AbstractColumn
|
|||
return $value;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
parent::configureOptions($resolver);
|
||||
|
||||
|
@ -69,7 +69,7 @@ class EntityColumn extends AbstractColumn
|
|||
|
||||
$resolver->setDefault('render', function (Options $options) {
|
||||
return function ($value, Part $context) use ($options) {
|
||||
/** @var DBElement $entity */
|
||||
/** @var DBElement|null $entity */
|
||||
$entity = $this->accessor->getValue($context, $options['property']);
|
||||
|
||||
if ($entity) {
|
||||
|
@ -83,7 +83,10 @@ class EntityColumn extends AbstractColumn
|
|||
|
||||
return sprintf('<i>%s</i>', $value);
|
||||
}
|
||||
throw new \InvalidArgumentException('$entity must not be null!');
|
||||
};
|
||||
});
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,9 +58,10 @@ class LogEntryTargetColumn extends AbstractColumn
|
|||
return $value;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
parent::configureOptions($resolver);
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function render($value, $context)
|
||||
|
|
|
@ -91,8 +91,9 @@ class PartAttachmentsColumn extends AbstractColumn
|
|||
return $tmp;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
parent::configureOptions($resolver);
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue