@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Linio\Component\Queue\Adapter; |
| 5 | 5 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | $this->getChannel()->queue_declare($job->getQueue(), true, $job->isPersistent(), false, false); |
| 39 | 39 | $this->getChannel()->basic_qos(null, 1, null); |
| 40 | - $this->getChannel()->basic_consume($job->getQueue(), '', false, false, false, false, function ($message) use ($job) { |
|
| 40 | + $this->getChannel()->basic_consume($job->getQueue(), '', false, false, false, false, function($message) use ($job) { |
|
| 41 | 41 | $job->setPayload($message->body); |
| 42 | 42 | $job->perform(); |
| 43 | 43 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Linio\Component\Queue\Adapter; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Linio\Component\Queue\Provider; |
| 5 | 5 | |
@@ -16,14 +16,14 @@ discard block |
||
| 16 | 16 | $container['queue.adapter_name'] = 'null'; |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | - $container['queue.adapter'] = $container->factory(function ($container) { |
|
| 19 | + $container['queue.adapter'] = $container->factory(function($container) { |
|
| 20 | 20 | $adapterFactory = new AdapterFactory(); |
| 21 | 21 | $adapter = $adapterFactory->getAdapter($container['queue.adapter_name'], $container['queue.adapter_options']); |
| 22 | 22 | |
| 23 | 23 | return $adapter; |
| 24 | 24 | }); |
| 25 | 25 | |
| 26 | - $container['queue.service'] = function ($container) { |
|
| 26 | + $container['queue.service'] = function($container) { |
|
| 27 | 27 | $queueService = new QueueService(); |
| 28 | 28 | $queueService->setAdapter($container['queue.adapter']); |
| 29 | 29 | $queueService->setLogger($container['monolog']); |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Linio\Component\Queue; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Linio\Component\Queue; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Linio\Component\Queue; |
| 5 | 5 | |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | $adapterClass = sprintf('%s\\Adapter\\%sAdapter', __NAMESPACE__, Inflector::pascalize($adapterName)); |
| 13 | 13 | |
| 14 | 14 | if (!class_exists($adapterClass)) { |
| 15 | - throw new \InvalidArgumentException('Adapter class does not exist: ' . $adapterClass); |
|
| 15 | + throw new \InvalidArgumentException('Adapter class does not exist: '.$adapterClass); |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | $adapter = new $adapterClass($adapterConfig); |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Linio\Component\Queue; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Linio\Component\Queue; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Linio\Component\Queue; |
| 5 | 5 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | $this->prepare($job); |
| 25 | 25 | $this->adapter->add($job); |
| 26 | 26 | } catch (\Exception $e) { |
| 27 | - $this->logger->error('[Queue] An error has occurred when adding job: ' . $e->getMessage(), (array) $e); |
|
| 27 | + $this->logger->error('[Queue] An error has occurred when adding job: '.$e->getMessage(), (array) $e); |
|
| 28 | 28 | |
| 29 | 29 | return false; |
| 30 | 30 | } |