Passed
Pull Request — master (#600)
by Aleksei
08:16 queued 03:02
created
src/Cache/src/Bootloader/CacheBootloader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     {
56 56
         $manager = new CacheManager($config, $container);
57 57
 
58
-        foreach ($config->getAliases() as $alias => $storageName) {
58
+        foreach ($config->getAliases() as $alias => $storageName){
59 59
             $container->bind($alias, static function (CacheManager $manager) use ($storageName) {
60 60
                 return $manager->storage($storageName);
61 61
             });
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                     ],
78 78
                     'file' => [
79 79
                         'type' => 'file',
80
-                        'path' => $dirs->get('runtime') . 'cache',
80
+                        'path' => $dirs->get('runtime').'cache',
81 81
                     ],
82 82
                 ],
83 83
                 'typeAliases' => [
Please login to merge, or discard this patch.
src/Cache/src/Core/CacheInjector.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,21 +25,21 @@  discard block
 block discarded – undo
25 25
 
26 26
     public function createInjection(ReflectionClass $class, string $context = null): CacheInterface
27 27
     {
28
-        try {
29
-            if ($context === null) {
28
+        try{
29
+            if ($context === null){
30 30
                 $connection = $this->provider->storage();
31
-            } else {
31
+            }else{
32 32
                 // Get Cache by context
33
-                try {
33
+                try{
34 34
                     $connection = $this->provider->storage($context);
35
-                } catch (InvalidArgumentException $e) {
35
+                }catch (InvalidArgumentException $e){
36 36
                     // Case when context doesn't match to configured connections
37 37
                     return $this->provider->storage();
38 38
                 }
39 39
             }
40 40
 
41 41
             $this->matchType($class, $context, $connection);
42
-        } catch (\Throwable $e) {
42
+        }catch (\Throwable $e){
43 43
             throw new ContainerException(sprintf("Can't inject the required cache. %s", $e->getMessage()), 0, $e);
44 44
         }
45 45
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     private function matchType(ReflectionClass $class, ?string $context, CacheInterface $connection): void
55 55
     {
56 56
         $className = $class->getName();
57
-        if ($className !== CacheInterface::class && !$connection instanceof $className) {
57
+        if ($className !== CacheInterface::class && !$connection instanceof $className){
58 58
             throw new \RuntimeException(
59 59
                 \sprintf(
60 60
                     "The cache obtained by the context `%s` doesn't match the type `%s`.",
Please login to merge, or discard this patch.
src/Queue/src/Core/QueueInjector.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,21 +25,21 @@  discard block
 block discarded – undo
25 25
 
26 26
     public function createInjection(ReflectionClass $class, string $context = null): QueueInterface
27 27
     {
28
-        try {
29
-            if ($context === null) {
28
+        try{
29
+            if ($context === null){
30 30
                 $connection = $this->queueManager->getConnection();
31
-            } else {
31
+            }else{
32 32
                 // Get Queue by context
33
-                try {
33
+                try{
34 34
                     $connection = $this->queueManager->getConnection($context);
35
-                } catch (InvalidArgumentException $e) {
35
+                }catch (InvalidArgumentException $e){
36 36
                     // Case when context doesn't match to configured connections
37 37
                     return $this->queueManager->getConnection();
38 38
                 }
39 39
             }
40 40
 
41 41
             $this->matchType($class, $context, $connection);
42
-        } catch (\Throwable $e) {
42
+        }catch (\Throwable $e){
43 43
             throw new ContainerException(sprintf("Can't inject the required queue. %s", $e->getMessage()), 0, $e);
44 44
         }
45 45
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     private function matchType(ReflectionClass $class, ?string $context, QueueInterface $connection): void
55 55
     {
56 56
         $className = $class->getName();
57
-        if ($className !== QueueInterface::class && !$connection instanceof $className) {
57
+        if ($className !== QueueInterface::class && !$connection instanceof $className){
58 58
             throw new \RuntimeException(
59 59
                 \sprintf(
60 60
                     "The queue obtained by the context `%s` doesn't match the type `%s`.",
Please login to merge, or discard this patch.
src/Cache/tests/Core/CacheInjectorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
                     'test' => $this->defaultCache,
77 77
                     'array' => new ArrayStorage(),
78 78
                 ][$name] ?? null;
79
-            if ($result === null) {
79
+            if ($result === null){
80 80
                 throw new NotFoundException();
81 81
             }
82 82
             return $result;
Please login to merge, or discard this patch.