mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-06 07:25:32 +01:00
Fixed some inspection issues.
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user