mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-21 02:41:35 +00:00
Fixed some inspection issues.
This commit is contained in:
parent
eef26f7ae6
commit
639829f5c5
97 changed files with 305 additions and 185 deletions
|
|
@ -9,6 +9,7 @@ use App\Entity\Devices\Device;
|
|||
use App\Entity\Parts\Category;
|
||||
use App\Entity\Parts\Part;
|
||||
use App\Repository\AbstractPartsContainingRepository;
|
||||
use InvalidArgumentException;
|
||||
|
||||
class DeviceRepository extends AbstractPartsContainingRepository
|
||||
{
|
||||
|
|
@ -16,7 +17,7 @@ class DeviceRepository extends AbstractPartsContainingRepository
|
|||
public function getParts(object $element, array $order_by = ['name' => 'ASC']): array
|
||||
{
|
||||
if (!$element instanceof Device) {
|
||||
throw new \InvalidArgumentException('$element must be an Device!');
|
||||
throw new InvalidArgumentException('$element must be an Device!');
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -27,7 +28,7 @@ class DeviceRepository extends AbstractPartsContainingRepository
|
|||
public function getPartsCount(object $element): int
|
||||
{
|
||||
if (!$element instanceof Device) {
|
||||
throw new \InvalidArgumentException('$element must be an Device!');
|
||||
throw new InvalidArgumentException('$element must be an Device!');
|
||||
}
|
||||
|
||||
//TODO: Change this later, when properly implemented devices
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue