mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-23 15:36:13 +01:00

[BUGFIX] Fix some php stan errors

Related #1120
This commit is contained in:
Karsten Nowak 2024-08-20 08:49:30 +02:00
parent f86b37df41
commit bf7ade8f98

View file

@ -54,7 +54,8 @@ final class CreateTestDataCommand extends Command
protected function execute(InputInterface $input, OutputInterface $output): int protected function execute(InputInterface $input, OutputInterface $output): int
{ {
$pageUid = (int)$input->getArgument('pageUid') ?? 0; $pageUid = $input->getArgument('pageUid') ?? 0;
\assert(\is_int($pageUid));
$deleteDataBefore = $input->getOption('delete-data-before') ?? false; $deleteDataBefore = $input->getOption('delete-data-before') ?? false;
\assert(\is_bool($deleteDataBefore)); \assert(\is_bool($deleteDataBefore));
$table = 'tx_tea_domain_model_tea'; $table = 'tx_tea_domain_model_tea';
@ -77,7 +78,7 @@ final class CreateTestDataCommand extends Command
$output->writeln(sprintf('Test data in page %s created.', $pageUid)); $output->writeln(sprintf('Test data in page %s created.', $pageUid));
$referenceIndex = GeneralUtility::makeInstance(ReferenceIndex::class); $referenceIndex = GeneralUtility::makeInstance(ReferenceIndex::class);
$referenceIndex->updateIndex(0); $referenceIndex->updateIndex(false);
$output->writeln('Reference index updated.'); $output->writeln('Reference index updated.');
return Command::SUCCESS; return Command::SUCCESS;