return self::SUCCESS;
} $io->
success(sprintf('Successfully deleted %d media files.',
$count));
return self::SUCCESS;
} private function report(InputInterface
$input, OutputInterface
$output): int
{ $mediaBatches =
$this->unusedMediaPurger->
getNotUsedMedia( $input->
getOption('limit'
) ?
(int) $input->
getOption('limit'
) : 50,
$input->
getOption('offset'
) ?
(int) $input->
getOption('offset'
) : null,
(int) $input->
getOption('grace-period-days'
),
$input->
getOption('folder-entity'
),
);
$output->
write(implode(',',
array_map(fn ($col) =>
sprintf('"%s"',
$col),
['Filename', 'Title', 'Uploaded At', 'File Size'
])));
foreach ($mediaBatches as $mediaBatch) { foreach ($mediaBatch as $media) { $row =
[ $media->
getFileNameIncludingExtension(),