mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-03 05:55:16 +01:00
Fixed phpstan analysis issues and bad code that showed up with phpstan 2.0
This commit is contained in:
@@ -151,7 +151,7 @@ class StructuralDBElementRepository extends AttachmentContainingDBElementReposit
|
||||
}
|
||||
if (null === $entity) {
|
||||
$class = $this->getClassName();
|
||||
/** @var AbstractStructuralDBElement $entity */
|
||||
/** @var TEntityClass $entity */
|
||||
$entity = new $class;
|
||||
$entity->setName($name);
|
||||
$entity->setParent($parent);
|
||||
@@ -265,7 +265,7 @@ class StructuralDBElementRepository extends AttachmentContainingDBElementReposit
|
||||
}
|
||||
|
||||
$class = $this->getClassName();
|
||||
/** @var AbstractStructuralDBElement $entity */
|
||||
/** @var TEntityClass $entity */
|
||||
$entity = new $class;
|
||||
$entity->setName($name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user