From 1262cfbb7b7e489dc6b46dacf393c334c347ec66 Mon Sep 17 00:00:00 2001 From: Karsten Nowak Date: Tue, 30 Jul 2024 11:24:13 +0200 Subject: [PATCH] [TASK] use assert to state data restrictions Related #1120 --- Classes/Command/CreateTestDataCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Command/CreateTestDataCommand.php b/Classes/Command/CreateTestDataCommand.php index 77cdb8c..f6ef35f 100644 --- a/Classes/Command/CreateTestDataCommand.php +++ b/Classes/Command/CreateTestDataCommand.php @@ -53,10 +53,10 @@ final class CreateTestDataCommand extends Command protected function execute(InputInterface $input, OutputInterface $output): int { - /** @var int $pageUid */ - $pageUid = $input->getArgument('pageUid') ?? 0; - /** @var bool $deleteDataBefore */ + $pageUid = (int)$input->getArgument('pageUid') ?? 0; + \assert(\is_int($pageUid)); $deleteDataBefore = $input->getOption('delete-data-before') ?? false; + \assert(\is_bool($deleteDataBefore)); $table = 'tx_tea_domain_model_tea'; $connectionForTable = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($table);