From ddc747acc6cc6e723da21711d48c0d83bf5e9de3 Mon Sep 17 00:00:00 2001 From: David Mellen Date: Thu, 18 Jul 2024 14:36:52 +0200 Subject: [PATCH] fix: change file name utility class name in delete command --- Classes/Command/DeleteBackupCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Command/DeleteBackupCommand.php b/Classes/Command/DeleteBackupCommand.php index 5c3230c..e23b1f2 100644 --- a/Classes/Command/DeleteBackupCommand.php +++ b/Classes/Command/DeleteBackupCommand.php @@ -4,7 +4,7 @@ namespace Remind\Backup\Command; -use Remind\Backup\Utility\FileNameUtility; +use Remind\Backup\Utility\FileNamingUtility; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -70,13 +70,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int $files = array_values(array_diff(scandir($dir, SCANDIR_SORT_ASCENDING), ['.', '..'])); $matches = array_filter($files, function (string $fileToCheck) use ($file) { - return preg_match(FileNameUtility::getRegexPattern($file), $fileToCheck); + return preg_match(FileNamingUtility::getRegexPattern($file), $fileToCheck); }); $filesToBeDeleted = array_slice($matches, 0, -$input->getOption(self::INPUT_KEEP_COUNT)); foreach ($filesToBeDeleted as $file) { - unlink(FileNameUtility::buildPath($dir, $file)); + unlink(FileNamingUtility::buildPath($dir, $file)); } return Command::SUCCESS;