Passed
Pull Request — master (#1193)
by butschster
17:21 queued 06:12
created
src/Telemetry/src/Monolog/TelemetryProcessor.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,20 +13,20 @@
 block discarded – undo
13 13
 {
14 14
     public function __construct(
15 15
         private readonly ContainerInterface $container,
16
-    ) {}
16
+    ){}
17 17
 
18 18
     /**
19 19
      * @psalm-suppress InvalidReturnType
20 20
      * @psalm-suppress InvalidReturnStatement
21 21
      */
22
-    public function __invoke(LogRecord|array $record): array|LogRecord
22
+    public function __invoke(LogRecord | array $record): array | LogRecord
23 23
     {
24 24
         $tracer = $this->container->get(TracerInterface::class);
25 25
         \assert($tracer instanceof TracerInterface);
26 26
 
27 27
         $context = $tracer->getContext();
28 28
 
29
-        if (!empty($context)) {
29
+        if (!empty($context)){
30 30
             $record['extra']['telemetry'] = $context;
31 31
         }
32 32
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,8 @@  discard block
 block discarded – undo
13 13
 {
14 14
     public function __construct(
15 15
         private readonly ContainerInterface $container,
16
-    ) {}
16
+    ) {
17
+}
17 18
 
18 19
     /**
19 20
      * @psalm-suppress InvalidReturnType
@@ -26,7 +27,8 @@  discard block
 block discarded – undo
26 27
 
27 28
         $context = $tracer->getContext();
28 29
 
29
-        if (!empty($context)) {
30
+        if (!empty($context))
31
+        {
30 32
             $record['extra']['telemetry'] = $context;
31 33
         }
32 34
 
Please login to merge, or discard this patch.
src/Telemetry/tests/Monolog/TelemetryProcessorTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             ],
73 73
         ];
74 74
 
75
-        if (!\class_exists(LogRecord::class)) {
75
+        if (!\class_exists(LogRecord::class)){
76 76
             return;
77 77
         }
78 78
 
@@ -127,6 +127,6 @@  discard block
 block discarded – undo
127 127
 
128 128
         $record = $processor->__invoke($record);
129 129
 
130
-        self::assertSame($expected, (array) $record);
130
+        self::assertSame($expected, (array)$record);
131 131
     }
132 132
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,8 @@
 block discarded – undo
72 72
             ],
73 73
         ];
74 74
 
75
-        if (!\class_exists(LogRecord::class)) {
75
+        if (!\class_exists(LogRecord::class))
76
+        {
76 77
             return;
77 78
         }
78 79
 
Please login to merge, or discard this patch.