Passed
Push — master ( a7d12b...46dbe8 )
by Dmitry
03:07
created
src/Tracing/Exporter/ZipkinExporter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
                 : null,
23 23
             'localEndpoint' => $this->getEndpoint(),
24 24
             'name' => $span->getName(),
25
-            'timestamp' => (integer) round($span->getStart()*1000000),
26
-            'duration' => (integer) round($span->getEnd()*1000000) - round($span->getStart()*1000000),
25
+            'timestamp' => (integer) round($span->getStart() * 1000000),
26
+            'duration' => (integer) round($span->getEnd() * 1000000) - round($span->getStart() * 1000000),
27 27
         ];
28 28
 
29 29
         foreach ($span->getAttributes() as $k => $v) {
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
                 $row['annotations'] = [];
39 39
             }
40 40
             $row['annotations'][] = [
41
-                'timestamp' => round($event->getTimestamp()*1000000),
41
+                'timestamp' => round($event->getTimestamp() * 1000000),
42 42
                 'value' => $event->getName(),
43 43
             ];
44 44
         }
Please login to merge, or discard this patch.
tests/TracingTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -128,13 +128,13 @@  discard block
 block discarded – undo
128 128
         $span = (new Tracer())->getActiveSpan();
129 129
 
130 130
         // set attributes
131
-        $span->setAttributes([ 'username' => 'nekufa' ]);
131
+        $span->setAttributes(['username' => 'nekufa']);
132 132
 
133 133
         // get attribute
134 134
         $this->assertSame($span->getAttribute('username'), 'nekufa');
135 135
         
136 136
         // otherwrite
137
-        $span->setAttributes([ 'email' => '[email protected]', ]);
137
+        $span->setAttributes(['email' => '[email protected]', ]);
138 138
 
139 139
         // null attributes
140 140
         $this->assertNull($span->getAttribute('username'));
@@ -149,9 +149,9 @@  discard block
 block discarded – undo
149 149
         ]);
150 150
 
151 151
         // keep order
152
-        $span->setAttributes([ 'a' => 1, 'b' => 2]);
152
+        $span->setAttributes(['a' => 1, 'b' => 2]);
153 153
         $this->assertSame(array_keys($span->getAttributes()), ['a', 'b']);
154
-        $span->setAttributes([ 'b' => 2, 'a' => 1, ]);
154
+        $span->setAttributes(['b' => 2, 'a' => 1, ]);
155 155
         $this->assertSame(array_keys($span->getAttributes()), ['b', 'a']);
156 156
 
157 157
         // attribute update don't change the order
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         $tracer = new Tracer();
220 220
         $span = $tracer->createSpan('serializable');
221 221
         $span->setAttribute('attribute', 'value');
222
-        $span->addEvent('greet', [ 'name' => 'nekufa' ]);
222
+        $span->addEvent('greet', ['name' => 'nekufa']);
223 223
 
224 224
         $serialized = serialize($span);
225 225
         $unserialized = unserialize($serialized);
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         $tracer = new Tracer();
243 243
         $span = $tracer->createSpan('guard.validate');
244 244
         $span->setAttribute('service', 'guard');
245
-        $event = $span->addEvent('validators.list', [ 'job' => 'stage.updateTime' ]);
245
+        $event = $span->addEvent('validators.list', ['job' => 'stage.updateTime']);
246 246
         $span->end();
247 247
 
248 248
         $exporter = new ZipkinExporter();
Please login to merge, or discard this patch.