Passed
Pull Request — master (#592)
by Aleksei
05:28
created
src/Queue/tests/Core/QueueInjectorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
                     'sync' => $this->defaultQueue,
87 87
                     'test' => new TestQueueClass(),
88 88
                 ][$name] ?? null;
89
-            if ($result === null) {
89
+            if ($result === null){
90 90
                 throw new NotFoundException();
91 91
             }
92 92
             return $result;
Please login to merge, or discard this patch.
src/Queue/src/Core/QueueInjector.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@  discard block
 block discarded – undo
22 22
     public function createInjection(ReflectionClass $class, string $context = null): QueueInterface
23 23
     {
24 24
         // Get Queue by context
25
-        if ($context === null) {
25
+        if ($context === null){
26 26
             $connection = $this->queueManager->getConnection();
27
-        } else {
28
-            try {
27
+        }else{
28
+            try{
29 29
                 $connection = $this->queueManager->getConnection($context);
30
-            } catch (InvalidArgumentException $e) {
30
+            }catch (InvalidArgumentException $e){
31 31
                 // Case when context doesn't match to configured connections
32 32
                 return $this->queueManager->getConnection();
33 33
             }
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
         // User specified a specific class type
37 37
         $className = $class->getName();
38
-        if ($className !== QueueInterface::class && !$connection instanceof $className) {
38
+        if ($className !== QueueInterface::class && !$connection instanceof $className){
39 39
             throw new \RuntimeException(
40 40
                 \sprintf(
41 41
                     "The queue obtained by the context `%s` doesn't match the type `%s`.",
Please login to merge, or discard this patch.
src/Queue/src/QueueManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         // Replaces alias with real pipeline name
30 30
         $name = $this->config->getAliases()[$name] ?? $name;
31 31
 
32
-        if (!isset($this->pipelines[$name])) {
32
+        if (!isset($this->pipelines[$name])){
33 33
             $this->pipelines[$name] = $this->resolveConnection($name);
34 34
         }
35 35
 
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $config = $this->config->getConnection($name);
46 46
 
47
-        try {
47
+        try{
48 48
             return $this->factory->make($config['driver'], $config);
49
-        } catch (ContainerException $e) {
49
+        }catch (ContainerException $e){
50 50
             throw new Exception\NotSupportedDriverException(
51 51
                 \sprintf(
52 52
                     'Driver `%s` is not supported. Connection `%s` cannot be created. Reason: `%s`',
Please login to merge, or discard this patch.