Fixed some inspection issues.

This commit is contained in:
Jan Böhmer 2022-08-14 19:32:53 +02:00
parent eef26f7ae6
commit 639829f5c5
97 changed files with 305 additions and 185 deletions

View file

@ -23,6 +23,7 @@ namespace App\Repository;
use App\Entity\Base\AbstractPartsContainingDBElement;
use App\Entity\Base\PartsContainingRepositoryInterface;
use App\Entity\Parts\Part;
use InvalidArgumentException;
abstract class AbstractPartsContainingRepository extends StructuralDBElementRepository implements PartsContainingRepositoryInterface
{
@ -46,7 +47,7 @@ abstract class AbstractPartsContainingRepository extends StructuralDBElementRepo
protected function getPartsByField(object $element, array $order_by, string $field_name): array
{
if (!$element instanceof AbstractPartsContainingDBElement) {
throw new \InvalidArgumentException('$element must be an instance of AbstractPartContainingDBElement!');
throw new InvalidArgumentException('$element must be an instance of AbstractPartContainingDBElement!');
}
$repo = $this->getEntityManager()->getRepository(Part::class);
@ -57,7 +58,7 @@ abstract class AbstractPartsContainingRepository extends StructuralDBElementRepo
protected function getPartsCountByField(object $element, string $field_name): int
{
if (!$element instanceof AbstractPartsContainingDBElement) {
throw new \InvalidArgumentException('$element must be an instance of AbstractPartContainingDBElement!');
throw new InvalidArgumentException('$element must be an instance of AbstractPartContainingDBElement!');
}
$repo = $this->getEntityManager()->getRepository(Part::class);