From af1ddcbae6ee76803a413fee49931defffdf03c0 Mon Sep 17 00:00:00 2001 From: Pablo Ogando Ferreira Date: Wed, 27 Sep 2023 15:58:14 +0200 Subject: [PATCH] Fix TranslatorInterface definition --- Command/renewedVideosWithoutOwnerCommand.php | 6 +++--- Exception/ExpiredVideoException.php | 4 +--- PumukitExpiredVideoBundle.php | 4 +--- Services/ExpiredVideoDeleteService.php | 2 +- Services/ExpiredVideoNotificationService.php | 2 +- Services/ExpiredVideoService.php | 3 ++- Services/ExpiredVideoUpdateService.php | 2 +- 7 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Command/renewedVideosWithoutOwnerCommand.php b/Command/renewedVideosWithoutOwnerCommand.php index 8a078ff..b7b4d1e 100644 --- a/Command/renewedVideosWithoutOwnerCommand.php +++ b/Command/renewedVideosWithoutOwnerCommand.php @@ -7,14 +7,14 @@ use Pumukit\ExpiredVideoBundle\Services\ExpiredVideoConfigurationService; use Pumukit\SchemaBundle\Document\Role; use Pumukit\SchemaBundle\Document\Tag; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -class renewedVideosWithoutOwnerCommand extends ContainerAwareCommand +class renewedVideosWithoutOwnerCommand extends Command { private $expiredVideoService; private $expiredVideoConfigurationService; @@ -35,7 +35,7 @@ protected function configure(): void ->addOption('user', null, InputArgument::OPTIONAL, 'username', 'allUsers') ->setHelp( <<<'EOT' - + Example: php bin/console pumukit:expired:video:renewed:without:owner diff --git a/Exception/ExpiredVideoException.php b/Exception/ExpiredVideoException.php index 29ad743..5816593 100644 --- a/Exception/ExpiredVideoException.php +++ b/Exception/ExpiredVideoException.php @@ -4,6 +4,4 @@ namespace Pumukit\ExpiredVideoBundle\Exception; -class ExpiredVideoException extends \Exception -{ -} +class ExpiredVideoException extends \Exception {} diff --git a/PumukitExpiredVideoBundle.php b/PumukitExpiredVideoBundle.php index e9f18fb..f3732ff 100644 --- a/PumukitExpiredVideoBundle.php +++ b/PumukitExpiredVideoBundle.php @@ -6,6 +6,4 @@ use Symfony\Component\HttpKernel\Bundle\Bundle; -class PumukitExpiredVideoBundle extends Bundle -{ -} +class PumukitExpiredVideoBundle extends Bundle {} diff --git a/Services/ExpiredVideoDeleteService.php b/Services/ExpiredVideoDeleteService.php index 562f045..1a5db3c 100644 --- a/Services/ExpiredVideoDeleteService.php +++ b/Services/ExpiredVideoDeleteService.php @@ -15,7 +15,7 @@ use Pumukit\SchemaBundle\Document\Track; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Finder\Finder; -use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Contracts\Translation\TranslatorInterface; class ExpiredVideoDeleteService { diff --git a/Services/ExpiredVideoNotificationService.php b/Services/ExpiredVideoNotificationService.php index a329c03..e5baae5 100644 --- a/Services/ExpiredVideoNotificationService.php +++ b/Services/ExpiredVideoNotificationService.php @@ -12,7 +12,7 @@ use Pumukit\SchemaBundle\Document\Person; use Pumukit\SchemaBundle\Document\PersonInterface; use Pumukit\SchemaBundle\Services\PersonService; -use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Contracts\Translation\TranslatorInterface; class ExpiredVideoNotificationService { diff --git a/Services/ExpiredVideoService.php b/Services/ExpiredVideoService.php index 9f77167..c4436b4 100644 --- a/Services/ExpiredVideoService.php +++ b/Services/ExpiredVideoService.php @@ -43,7 +43,8 @@ public function getExpiredVideos() public function getExpiredVideosByDateAndRange(int $days, bool $range = true) { $qb = $this->mmobjRepo->createQueryBuilder() - ->field($this->expiredVideoConfigurationService->getMultimediaObjectPropertyExpirationDateKey(true))->exists(true); + ->field($this->expiredVideoConfigurationService->getMultimediaObjectPropertyExpirationDateKey(true))->exists(true) + ; if ($range) { $now = new \DateTimeImmutable(date('Y-m-d H:i:s')); diff --git a/Services/ExpiredVideoUpdateService.php b/Services/ExpiredVideoUpdateService.php index 07b192f..a0adf67 100644 --- a/Services/ExpiredVideoUpdateService.php +++ b/Services/ExpiredVideoUpdateService.php @@ -11,7 +11,7 @@ use Pumukit\SchemaBundle\Document\Role; use Pumukit\SchemaBundle\Document\Tag; use Pumukit\SchemaBundle\Services\PersonService; -use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Contracts\Translation\TranslatorInterface; class ExpiredVideoUpdateService {