Test Failed
Pull Request — master (#1190)
by butschster
10:27
created
src/Telemetry/src/AbstractTracer.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 {
20 20
     public function __construct(
21 21
         private readonly ?ScopeInterface $scope = new Container(),
22
-    ) {
22
+    ){
23 23
     }
24 24
 
25 25
     /**
@@ -28,33 +28,33 @@  discard block
 block discarded – undo
28 28
     final protected function runScope(Span $span, callable $callback): mixed
29 29
     {
30 30
         $container = ContainerScope::getContainer();
31
-        if ($container === null) {
31
+        if ($container === null){
32 32
             return $this->scope->runScope([
33 33
                 SpanInterface::class => $span,
34 34
                 TracerInterface::class => $this,
35 35
             ], static fn (InvokerInterface $invoker): mixed => $invoker->invoke($callback));
36 36
         }
37 37
 
38
-        if ($container instanceof Container) {
38
+        if ($container instanceof Container){
39 39
             $invoker = $container;
40 40
             $binder = $container;
41
-        } else {
41
+        }else{
42 42
             /** @var InvokerInterface $invoker */
43 43
             $invoker = $container->get(InvokerInterface::class);
44 44
             /** @var BinderInterface $binder */
45 45
             $binder = $container->get(BinderInterface::class);
46 46
         }
47 47
 
48
-        try {
48
+        try{
49 49
             $prevSpan = $container->get(SpanInterface::class);
50
-        } catch (\Throwable) {
50
+        }catch (\Throwable){
51 51
             $prevSpan = null;
52 52
         }
53 53
 
54 54
         $binder->bindSingleton(SpanInterface::class, $span);
55
-        try {
55
+        try{
56 56
             return $invoker->invoke($callback);
57
-        } finally {
57
+        }finally{
58 58
             $prevSpan === null
59 59
                 ? $binder->removeBinding(SpanInterface::class)
60 60
                 : $binder->bindSingleton(SpanInterface::class, $prevSpan);
Please login to merge, or discard this patch.
Braces   +17 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,33 +28,43 @@
 block discarded – undo
28 28
     final protected function runScope(Span $span, callable $callback): mixed
29 29
     {
30 30
         $container = ContainerScope::getContainer();
31
-        if ($container === null) {
31
+        if ($container === null)
32
+        {
32 33
             return $this->scope->runScope([
33 34
                 SpanInterface::class => $span,
34 35
                 TracerInterface::class => $this,
35 36
             ], static fn (InvokerInterface $invoker): mixed => $invoker->invoke($callback));
36 37
         }
37 38
 
38
-        if ($container instanceof Container) {
39
+        if ($container instanceof Container)
40
+        {
39 41
             $invoker = $container;
40 42
             $binder = $container;
41
-        } else {
43
+        }
44
+        else
45
+        {
42 46
             /** @var InvokerInterface $invoker */
43 47
             $invoker = $container->get(InvokerInterface::class);
44 48
             /** @var BinderInterface $binder */
45 49
             $binder = $container->get(BinderInterface::class);
46 50
         }
47 51
 
48
-        try {
52
+        try
53
+        {
49 54
             $prevSpan = $container->get(SpanInterface::class);
50
-        } catch (\Throwable) {
55
+        }
56
+        catch (\Throwable)
57
+        {
51 58
             $prevSpan = null;
52 59
         }
53 60
 
54 61
         $binder->bindSingleton(SpanInterface::class, $span);
55
-        try {
62
+        try
63
+        {
56 64
             return $invoker->invoke($callback);
57
-        } finally {
65
+        }
66
+        finally
67
+        {
58 68
             $prevSpan === null
59 69
                 ? $binder->removeBinding(SpanInterface::class)
60 70
                 : $binder->bindSingleton(SpanInterface::class, $prevSpan);
Please login to merge, or discard this patch.
src/Telemetry/src/Bootloader/TelemetryBootloader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
     public function __construct(
36 36
         private readonly ConfiguratorInterface $config,
37
-    ) {
37
+    ){
38 38
     }
39 39
 
40 40
     public function init(EnvironmentInterface $env): void
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     /**
46 46
      * @param class-string<TracerFactoryInterface>|TracerFactoryInterface|Autowire $driver
47 47
      */
48
-    public function registerTracer(string $name, string|TracerFactoryInterface|Autowire $driver): void
48
+    public function registerTracer(string $name, string | TracerFactoryInterface | Autowire $driver): void
49 49
     {
50 50
         $this->config->modify(
51 51
             TelemetryConfig::CONFIG,
Please login to merge, or discard this patch.
src/SendIt/tests/RenderTest.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
     public function defineDirectories(string $root): array
32 32
     {
33 33
         return [
34
-                'root' => __DIR__ . '/App',
35
-                'app'  => __DIR__ . '/App'
34
+                'root' => __DIR__.'/App',
35
+                'app'  => __DIR__.'/App'
36 36
             ] + parent::defineDirectories($root);
37 37
     }
38 38
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     {
41 41
         parent::tearDown();
42 42
 
43
-        foreach (glob(__DIR__ . '/App/runtime/cache/views/*.php') as $file) {
43
+        foreach (glob(__DIR__.'/App/runtime/cache/views/*.php') as $file){
44 44
             @unlink($file);
45 45
         }
46 46
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,8 @@
 block discarded – undo
40 40
     {
41 41
         parent::tearDown();
42 42
 
43
-        foreach (glob(__DIR__ . '/App/runtime/cache/views/*.php') as $file) {
43
+        foreach (glob(__DIR__ . '/App/runtime/cache/views/*.php') as $file)
44
+        {
44 45
             @unlink($file);
45 46
         }
46 47
     }
Please login to merge, or discard this patch.
src/Router/tests/Fixtures/UserContext.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 final class UserContext
8 8
 {
9
-    private function __construct() {}
9
+    private function __construct(){}
10 10
 
11 11
     public static function create(): self
12 12
     {
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,9 @@
 block discarded – undo
6 6
 
7 7
 final class UserContext
8 8
 {
9
-    private function __construct() {}
9
+    private function __construct()
10
+    {
11
+}
10 12
 
11 13
     public static function create(): self
12 14
     {
Please login to merge, or discard this patch.
src/Router/tests/Fixtures/UserContextController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function __construct(
10 10
         private readonly UserContext $scope,
11
-    ) {}
11
+    ){}
12 12
 
13 13
     public function scope(): string
14 14
     {
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,8 @@
 block discarded – undo
8 8
 {
9 9
     public function __construct(
10 10
         private readonly UserContext $scope,
11
-    ) {}
11
+    ) {
12
+}
12 13
 
13 14
     public function scope(): string
14 15
     {
Please login to merge, or discard this patch.
src/Cache/src/Event/CacheEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,6 +8,6 @@
 block discarded – undo
8 8
 {
9 9
     public function __construct(
10 10
         public readonly string $key,
11
-    ) {
11
+    ){
12 12
     }
13 13
 }
Please login to merge, or discard this patch.
src/Cache/src/CacheRepository.php 2 patches
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,8 @@  discard block
 block discarded – undo
36 36
 
37 37
         $value = $this->storage->get($key);
38 38
 
39
-        if ($value === null) {
39
+        if ($value === null)
40
+        {
40 41
             $this->dispatcher?->dispatch(new CacheMissed($key));
41 42
 
42 43
             return $default;
@@ -90,7 +91,8 @@  discard block
 block discarded – undo
90 91
     {
91 92
         $result = [];
92 93
 
93
-        foreach ($keys as $key) {
94
+        foreach ($keys as $key)
95
+        {
94 96
             $result[$key] = $this->get($key, $default);
95 97
         }
96 98
 
@@ -101,7 +103,8 @@  discard block
 block discarded – undo
101 103
     {
102 104
         $state = null;
103 105
 
104
-        foreach ($values as $key => $value) {
106
+        foreach ($values as $key => $value)
107
+        {
105 108
             $result = $this->set($key, $value, $ttl);
106 109
             $state = \is_null($state) ? $result : $result && $state;
107 110
         }
@@ -112,7 +115,8 @@  discard block
 block discarded – undo
112 115
     public function deleteMultiple(iterable $keys): bool
113 116
     {
114 117
         $state = null;
115
-        foreach ($keys as $key) {
118
+        foreach ($keys as $key)
119
+        {
116 120
             $result = $this->delete($key);
117 121
             $state = \is_null($state) ? $result : $result && $state;
118 122
         }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         protected CacheInterface $storage,
26 26
         protected ?EventDispatcherInterface $dispatcher = null,
27 27
         protected ?string $prefix = null
28
-    ) {
28
+    ){
29 29
     }
30 30
 
31 31
     public function get(string $key, mixed $default = null): mixed
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         $value = $this->storage->get($key);
38 38
 
39
-        if ($value === null) {
39
+        if ($value === null){
40 40
             $this->dispatcher?->dispatch(new CacheMissed($key));
41 41
 
42 42
             return $default;
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         return $value;
48 48
     }
49 49
 
50
-    public function set(string $key, mixed $value, \DateInterval|int|null $ttl = null): bool
50
+    public function set(string $key, mixed $value, \DateInterval | int | null $ttl = null): bool
51 51
     {
52 52
         $key = $this->resolveKey($key);
53 53
 
@@ -90,18 +90,18 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $result = [];
92 92
 
93
-        foreach ($keys as $key) {
93
+        foreach ($keys as $key){
94 94
             $result[$key] = $this->get($key, $default);
95 95
         }
96 96
 
97 97
         return $result;
98 98
     }
99 99
 
100
-    public function setMultiple(iterable $values, \DateInterval|int|null $ttl = null): bool
100
+    public function setMultiple(iterable $values, \DateInterval | int | null $ttl = null): bool
101 101
     {
102 102
         $state = null;
103 103
 
104
-        foreach ($values as $key => $value) {
104
+        foreach ($values as $key => $value){
105 105
             $result = $this->set($key, $value, $ttl);
106 106
             $state = \is_null($state) ? $result : $result && $state;
107 107
         }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     public function deleteMultiple(iterable $keys): bool
113 113
     {
114 114
         $state = null;
115
-        foreach ($keys as $key) {
115
+        foreach ($keys as $key){
116 116
             $result = $this->delete($key);
117 117
             $state = \is_null($state) ? $result : $result && $state;
118 118
         }
@@ -132,6 +132,6 @@  discard block
 block discarded – undo
132 132
 
133 133
     private function resolveKey(string $key): string
134 134
     {
135
-        return $this->prefix . $key;
135
+        return $this->prefix.$key;
136 136
     }
137 137
 }
Please login to merge, or discard this patch.
src/Router/tests/Diactoros/UploadedFileFactory.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         ?string $clientFilename = null,
22 22
         ?string $clientMediaType = null
23 23
     ): UploadedFileInterface {
24
-        if ($size === null) {
24
+        if ($size === null){
25 25
             $size = $stream->getSize();
26 26
         }
27 27
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,8 @@
 block discarded – undo
21 21
         ?string $clientFilename = null,
22 22
         ?string $clientMediaType = null
23 23
     ): UploadedFileInterface {
24
-        if ($size === null) {
24
+        if ($size === null)
25
+        {
25 26
             $size = $stream->getSize();
26 27
         }
27 28
 
Please login to merge, or discard this patch.
src/Router/tests/TestCore.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
 
15 15
     public function callAction(string $controller, ?string $action = null, array $parameters = []): string
16 16
     {
17
-        return '@wrapped.' . $this->core->callAction($controller, $action, $parameters);
17
+        return '@wrapped.'.$this->core->callAction($controller, $action, $parameters);
18 18
     }
19 19
 }
Please login to merge, or discard this patch.