Test Failed
Pull Request — master (#1214)
by
unknown
28:34 queued 14:46
created
src/Telemetry/src/AbstractTracer.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 {
21 21
     public function __construct(
22 22
         private readonly ?ScopeInterface $scope = new Container(),
23
-    ) {}
23
+    ){}
24 24
 
25 25
     /**
26 26
      * @throws \Throwable
@@ -28,43 +28,43 @@  discard block
 block discarded – undo
28 28
     final protected function runScope(SpanInterface $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 55
 
56
-        try {
56
+        try{
57 57
             return $prevSpan === null
58 58
                 ? $this->scope->runScope(
59 59
                     new Scope(
60
-                        bindings: [
60
+                        bindings : [
61 61
                             TracerInterface::class => $this,
62 62
                         ],
63 63
                     ),
64
-                    static fn(): mixed => $invoker->invoke($callback),
64
+                    static fn() : mixed => $invoker->invoke($callback),
65 65
                 )
66 66
                 : $invoker->invoke($callback);
67
-        } finally {
67
+        }finally{
68 68
             $prevSpan === null
69 69
                 ? $binder->removeBinding(SpanInterface::class)
70 70
                 : $binder->bindSingleton(SpanInterface::class, $prevSpan);
Please login to merge, or discard this patch.
Braces   +19 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@  discard block
 block discarded – undo
20 20
 {
21 21
     public function __construct(
22 22
         private readonly ?ScopeInterface $scope = new Container(),
23
-    ) {}
23
+    ) {
24
+}
24 25
 
25 26
     /**
26 27
      * @throws \Throwable
@@ -28,32 +29,40 @@  discard block
 block discarded – undo
28 29
     final protected function runScope(SpanInterface $span, callable $callback): mixed
29 30
     {
30 31
         $container = ContainerScope::getContainer();
31
-        if ($container === null) {
32
+        if ($container === null)
33
+        {
32 34
             return $this->scope->runScope([
33 35
                 SpanInterface::class => $span,
34 36
                 TracerInterface::class => $this,
35 37
             ], static fn(InvokerInterface $invoker): mixed => $invoker->invoke($callback));
36 38
         }
37 39
 
38
-        if ($container instanceof Container) {
40
+        if ($container instanceof Container)
41
+        {
39 42
             $invoker = $container;
40 43
             $binder = $container;
41
-        } else {
44
+        }
45
+        else
46
+        {
42 47
             /** @var InvokerInterface $invoker */
43 48
             $invoker = $container->get(InvokerInterface::class);
44 49
             /** @var BinderInterface $binder */
45 50
             $binder = $container->get(BinderInterface::class);
46 51
         }
47 52
 
48
-        try {
53
+        try
54
+        {
49 55
             $prevSpan = $container->get(SpanInterface::class);
50
-        } catch (\Throwable) {
56
+        }
57
+        catch (\Throwable)
58
+        {
51 59
             $prevSpan = null;
52 60
         }
53 61
 
54 62
         $binder->bindSingleton(SpanInterface::class, $span);
55 63
 
56
-        try {
64
+        try
65
+        {
57 66
             return $prevSpan === null
58 67
                 ? $this->scope->runScope(
59 68
                     new Scope(
@@ -64,7 +73,9 @@  discard block
 block discarded – undo
64 73
                     static fn(): mixed => $invoker->invoke($callback),
65 74
                 )
66 75
                 : $invoker->invoke($callback);
67
-        } finally {
76
+        }
77
+        finally
78
+        {
68 79
             $prevSpan === null
69 80
                 ? $binder->removeBinding(SpanInterface::class)
70 81
                 : $binder->bindSingleton(SpanInterface::class, $prevSpan);
Please login to merge, or discard this patch.