Test Failed
Pull Request — master (#1214)
by
unknown
12:10
created
src/Telemetry/src/AbstractTracer.php 1 patch
Spacing   +11 added lines, -11 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
      * @throws \Throwable
@@ -27,41 +27,41 @@  discard block
 block discarded – undo
27 27
     final protected function runScope(SpanInterface $span, callable $callback): mixed
28 28
     {
29 29
         $container = ContainerScope::getContainer();
30
-        if ($container === null) {
30
+        if ($container === null){
31 31
             return $this->scope->runScope([
32 32
                 SpanInterface::class => $span,
33 33
                 TracerInterface::class => $this,
34 34
             ], static fn(InvokerInterface $invoker): mixed => $invoker->invoke($callback));
35 35
         }
36 36
 
37
-        if ($container instanceof Container) {
37
+        if ($container instanceof Container){
38 38
             $invoker = $container;
39 39
             $binder = $container;
40
-        } else {
40
+        }else{
41 41
             /** @var InvokerInterface $invoker */
42 42
             $invoker = $container->get(InvokerInterface::class);
43 43
             /** @var BinderInterface $binder */
44 44
             $binder = $container->get(BinderInterface::class);
45 45
         }
46 46
 
47
-        try {
47
+        try{
48 48
             $prevSpan = $container->get(SpanInterface::class);
49
-        } catch (\Throwable) {
49
+        }catch (\Throwable){
50 50
             $prevSpan = null;
51 51
         }
52 52
 
53 53
         $binder->bindSingleton(SpanInterface::class, $span);
54
-        if ($prevSpan === null) {
54
+        if ($prevSpan === null){
55 55
             $binder->bindSingleton(TracerInterface::class, $this, true);
56 56
         }
57 57
 
58
-        try {
58
+        try{
59 59
             return $invoker->invoke($callback);
60
-        } finally {
61
-            if ($prevSpan === null) {
60
+        }finally{
61
+            if ($prevSpan === null){
62 62
                 $binder->removeBinding(SpanInterface::class);
63 63
                 $binder->removeBinding(TracerInterface::class);
64
-            } else {
64
+            }else{
65 65
                 $binder->bindSingleton(SpanInterface::class, $prevSpan);
66 66
             }
67 67
         }
Please login to merge, or discard this patch.