mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-03 06:54:34 +02:00
Applied symplify rules to codebase.
This commit is contained in:
parent
2f20d90041
commit
388e847b17
136 changed files with 1370 additions and 789 deletions
|
@ -36,6 +36,7 @@ use App\Entity\Parts\Supplier;
|
|||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use InvalidArgumentException;
|
||||
|
||||
class DataStructureFixtures extends Fixture
|
||||
{
|
||||
|
@ -71,7 +72,7 @@ class DataStructureFixtures extends Fixture
|
|||
public function createNodesForClass(string $class, ObjectManager $manager): void
|
||||
{
|
||||
if (! new $class() instanceof StructuralDBElement) {
|
||||
throw new \InvalidArgumentException('$class must be a StructuralDBElement!');
|
||||
throw new InvalidArgumentException('$class must be a StructuralDBElement!');
|
||||
}
|
||||
|
||||
$table_name = $this->em->getClassMetadata($class)->getTableName();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue