Fix PHPStan errors in PopulateKicadCommand and BatchEdaController

Add @var type annotations for Doctrine repository findAll() calls so
PHPStan can resolve getEdaInfo() on Footprint/Category entities. Fix
array return type for numeric-string keys and add explicit callback to
array_filter to satisfy strict rules.
This commit is contained in:
Sebastian Almberg 2026-02-10 08:15:35 +01:00
parent e05a751b84
commit 310872b7a5
2 changed files with 6 additions and 2 deletions

View file

@ -27,7 +27,7 @@ class BatchEdaController extends AbstractController
$redirectUrl = $request->query->getString('_redirect', '');
//Parse part IDs and load parts
$idArray = array_filter(array_map('intval', explode(',', $ids)));
$idArray = array_filter(array_map('intval', explode(',', $ids)), static fn (int $id): bool => $id > 0);
$parts = $this->entityManager->getRepository(Part::class)->findBy(['id' => $idArray]);
if ($parts === []) {