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

@ -24,6 +24,7 @@ use App\Entity\Parts\Part;
use App\Entity\Parts\Storelocation;
use App\Repository\AbstractPartsContainingRepository;
use Doctrine\ORM\QueryBuilder;
use InvalidArgumentException;
class StorelocationRepository extends AbstractPartsContainingRepository
{
@ -33,7 +34,7 @@ class StorelocationRepository extends AbstractPartsContainingRepository
public function getParts(object $element, array $order_by = ['name' => 'ASC']): array
{
if (!$element instanceof Storelocation) {
throw new \InvalidArgumentException('$element must be an Storelocation!');
throw new InvalidArgumentException('$element must be an Storelocation!');
}
$qb = new QueryBuilder($this->getEntityManager());
@ -54,7 +55,7 @@ class StorelocationRepository extends AbstractPartsContainingRepository
public function getPartsCount(object $element): int
{
if (!$element instanceof Storelocation) {
throw new \InvalidArgumentException('$element must be an Storelocation!');
throw new InvalidArgumentException('$element must be an Storelocation!');
}
$qb = new QueryBuilder($this->getEntityManager());