]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Command/RedisWorkerCommand.php
Add a real configuration for CS-Fixer
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Command / RedisWorkerCommand.php
index 2d06af44732c4480c698b95b3339f1af1039a62c..d94900ad01470064138e3e76a3269e52b05034d7 100644 (file)
@@ -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')
         );