Skip to content

Commit

Permalink
chore: PHPstan fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
roadiz-ci committed Mar 8, 2024
1 parent 269bfbb commit 10a32f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Console/DocumentClearFolderCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ protected function getDocumentQueryBuilder(FolderInterface $folder): QueryBuilde
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->io = new SymfonyStyle($input, $output);
$folderId = $input->getArgument('folderId');

$folderId = intval($input->getArgument('folderId'));
if ($folderId <= 0) {
if (!\is_numeric($folderId) || $folderId <= 0) {
throw new \InvalidArgumentException('Folder ID must be a valid ID');
}
$em = $this->getManager();
Expand Down

0 comments on commit 10a32f4

Please sign in to comment.