Passed
Pull Request — master (#1206)
by Aleksei
12:42
created
src/Telemetry/src/AbstractTracer.php 1 patch
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(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
-        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.