mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-16 22:49:36 +00:00
Fixed phpstan issues
This commit is contained in:
parent
1641708508
commit
f6764170e1
1 changed files with 4 additions and 4 deletions
|
|
@ -65,28 +65,28 @@ class SandboxedLabelExtension extends AbstractExtension
|
||||||
*/
|
*/
|
||||||
public function associatedParts(AbstractPartsContainingDBElement $element): array
|
public function associatedParts(AbstractPartsContainingDBElement $element): array
|
||||||
{
|
{
|
||||||
/** @var AbstractPartsContainingRepository $repo */
|
/** @var AbstractPartsContainingRepository<AbstractPartsContainingDBElement> $repo */
|
||||||
$repo = $this->em->getRepository($element::class);
|
$repo = $this->em->getRepository($element::class);
|
||||||
return $repo->getParts($element);
|
return $repo->getParts($element);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function associatedPartsCount(AbstractPartsContainingDBElement $element): int
|
public function associatedPartsCount(AbstractPartsContainingDBElement $element): int
|
||||||
{
|
{
|
||||||
/** @var AbstractPartsContainingRepository $repo */
|
/** @var AbstractPartsContainingRepository<AbstractPartsContainingDBElement> $repo */
|
||||||
$repo = $this->em->getRepository($element::class);
|
$repo = $this->em->getRepository($element::class);
|
||||||
return $repo->getPartsCount($element);
|
return $repo->getPartsCount($element);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function associatedPartsRecursive(AbstractPartsContainingDBElement $element): array
|
public function associatedPartsRecursive(AbstractPartsContainingDBElement $element): array
|
||||||
{
|
{
|
||||||
/** @var AbstractPartsContainingRepository $repo */
|
/** @var AbstractPartsContainingRepository<AbstractPartsContainingDBElement> $repo */
|
||||||
$repo = $this->em->getRepository($element::class);
|
$repo = $this->em->getRepository($element::class);
|
||||||
return $repo->getPartsRecursive($element);
|
return $repo->getPartsRecursive($element);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function associatedPartsCountRecursive(AbstractPartsContainingDBElement $element): int
|
public function associatedPartsCountRecursive(AbstractPartsContainingDBElement $element): int
|
||||||
{
|
{
|
||||||
/** @var AbstractPartsContainingRepository $repo */
|
/** @var AbstractPartsContainingRepository<AbstractPartsContainingDBElement> $repo */
|
||||||
$repo = $this->em->getRepository($element::class);
|
$repo = $this->em->getRepository($element::class);
|
||||||
return $repo->getPartsCountRecursive($element);
|
return $repo->getPartsCountRecursive($element);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue