chore: cleanup, add PHPStan type annotations

This commit is contained in:
Björn Fromme
2026-04-03 13:45:41 +02:00
parent a264526127
commit fce6d1615a
14 changed files with 91 additions and 41 deletions
+1
View File
@@ -200,6 +200,7 @@ class BpnXmlSyncCommand extends Command
}
/**
* @return array<string, int>
* @throws FilesystemException
*/
private function syncFiles(SymfonyStyle $io): array
+4 -3
View File
@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace App\Command;
use App\Repository\BookingEditDraftRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
@@ -20,6 +21,7 @@ class DraftInspectCommand extends Command
{
public function __construct(
private readonly BookingEditDraftRepository $draftRepository,
private readonly EntityManagerInterface $entityManager,
) {
parent::__construct();
}
@@ -102,11 +104,10 @@ class DraftInspectCommand extends Command
return Command::SUCCESS;
}
$em = $this->draftRepository->getEntityManager();
foreach ($drafts as $draft) {
$em->remove($draft);
$this->entityManager->remove($draft);
}
$em->flush();
$this->entityManager->flush();
$io->success(sprintf('Deleted %d draft(s).', \count($drafts)));
}