mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-11 18:02:59 +01:00
Fixed phpstan analysis issues and bad code that showed up with phpstan 2.0
This commit is contained in:
@@ -146,11 +146,11 @@ final class LabelExampleElementsGenerator
|
||||
throw new InvalidArgumentException('$class must be an child of AbstractStructuralDBElement');
|
||||
}
|
||||
|
||||
/** @var AbstractStructuralDBElement $parent */
|
||||
/** @var T $parent */
|
||||
$parent = new $class();
|
||||
$parent->setName('Example');
|
||||
|
||||
/** @var AbstractStructuralDBElement $child */
|
||||
/** @var T $child */
|
||||
$child = new $class();
|
||||
$child->setName((new ReflectionClass($class))->getShortName());
|
||||
$child->setParent($parent);
|
||||
|
||||
Reference in New Issue
Block a user