mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 17:39:06 +02:00
Fixed some inspection issues.
This commit is contained in:
parent
eef26f7ae6
commit
639829f5c5
97 changed files with 305 additions and 185 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue