From f808b01692a835673f328d7221ba8c212caa9b61 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 1 Jul 2017 09:52:38 +0200 Subject: Add a real configuration for CS-Fixer --- src/Wallabag/ImportBundle/Command/ImportCommand.php | 10 +++++----- src/Wallabag/ImportBundle/Command/RedisWorkerCommand.php | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/Wallabag/ImportBundle/Command') diff --git a/src/Wallabag/ImportBundle/Command/ImportCommand.php b/src/Wallabag/ImportBundle/Command/ImportCommand.php index 5f1ab0af..99056c2c 100644 --- a/src/Wallabag/ImportBundle/Command/ImportCommand.php +++ b/src/Wallabag/ImportBundle/Command/ImportCommand.php @@ -5,8 +5,8 @@ namespace Wallabag\ImportBundle\Command; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Config\Definition\Exception\Exception; use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; class ImportCommand extends ContainerAwareCommand @@ -27,7 +27,7 @@ class ImportCommand extends ContainerAwareCommand protected function execute(InputInterface $input, OutputInterface $output) { - $output->writeln('Start : '.(new \DateTime())->format('d-m-Y G:i:s').' ---'); + $output->writeln('Start : ' . (new \DateTime())->format('d-m-Y G:i:s') . ' ---'); if (!file_exists($input->getArgument('filepath'))) { throw new Exception(sprintf('File "%s" not found', $input->getArgument('filepath'))); @@ -80,12 +80,12 @@ class ImportCommand extends ContainerAwareCommand if (true === $res) { $summary = $import->getSummary(); - $output->writeln(''.$summary['imported'].' imported'); - $output->writeln(''.$summary['skipped'].' already saved'); + $output->writeln('' . $summary['imported'] . ' imported'); + $output->writeln('' . $summary['skipped'] . ' already saved'); } $em->clear(); - $output->writeln('End : '.(new \DateTime())->format('d-m-Y G:i:s').' ---'); + $output->writeln('End : ' . (new \DateTime())->format('d-m-Y G:i:s') . ' ---'); } } diff --git a/src/Wallabag/ImportBundle/Command/RedisWorkerCommand.php b/src/Wallabag/ImportBundle/Command/RedisWorkerCommand.php index 2d06af44..d94900ad 100644 --- a/src/Wallabag/ImportBundle/Command/RedisWorkerCommand.php +++ b/src/Wallabag/ImportBundle/Command/RedisWorkerCommand.php @@ -2,13 +2,13 @@ namespace Wallabag\ImportBundle\Command; +use Simpleue\Worker\QueueWorker; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Config\Definition\Exception\Exception; use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -use Simpleue\Worker\QueueWorker; class RedisWorkerCommand extends ContainerAwareCommand { @@ -24,18 +24,18 @@ class RedisWorkerCommand extends ContainerAwareCommand protected function execute(InputInterface $input, OutputInterface $output) { - $output->writeln('Worker started at: '.(new \DateTime())->format('d-m-Y G:i:s')); + $output->writeln('Worker started at: ' . (new \DateTime())->format('d-m-Y G:i:s')); $output->writeln('Waiting for message ...'); $serviceName = $input->getArgument('serviceName'); - if (!$this->getContainer()->has('wallabag_import.queue.redis.'.$serviceName) || !$this->getContainer()->has('wallabag_import.consumer.redis.'.$serviceName)) { + if (!$this->getContainer()->has('wallabag_import.queue.redis.' . $serviceName) || !$this->getContainer()->has('wallabag_import.consumer.redis.' . $serviceName)) { throw new Exception(sprintf('No queue or consumer found for service name: "%s"', $input->getArgument('serviceName'))); } $worker = new QueueWorker( - $this->getContainer()->get('wallabag_import.queue.redis.'.$serviceName), - $this->getContainer()->get('wallabag_import.consumer.redis.'.$serviceName), + $this->getContainer()->get('wallabag_import.queue.redis.' . $serviceName), + $this->getContainer()->get('wallabag_import.consumer.redis.' . $serviceName), (int) $input->getOption('maxIterations') ); -- cgit v1.2.3