Skip to content

Commit 8326fe7

Browse files
committed
Fix: cs
1 parent da3dbfe commit 8326fe7

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

app/CpuTraceAggregator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ public function addTrace(array $tags, string $key): void
2020
}
2121
$this->results[$tagsKey][$key]++;
2222
}
23-
}
23+
}

app/MemoryTraceAggregator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function getGrouppedTraces(): array
4343
foreach ($this->results as $tagsKey => $tagResuts) {
4444
foreach ($tagResuts as $key => $traces) {
4545
if ($traces) {
46-
$results[$tagsKey][$key] = (int)(array_sum($traces)/count($traces));
46+
$results[$tagsKey][$key] = (int) (array_sum($traces) / count($traces));
4747
} else {
4848
$results[$tagsKey][$key] = 0;
4949
}
@@ -52,4 +52,4 @@ public function getGrouppedTraces(): array
5252

5353
return $results;
5454
}
55-
}
55+
}

app/TraceAggregatorAbstract.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public function clear(): void
2424
*/
2525
abstract public function addTrace(array $tags, string $key): void;
2626

27-
public function countGrouppedTraces(): int {
27+
public function countGrouppedTraces(): int
28+
{
2829
$count = 0;
2930
foreach ($this->results as $tagResuts) {
3031
$count += count($tagResuts);
@@ -35,7 +36,8 @@ public function countGrouppedTraces(): int {
3536
/**
3637
* @return ResultsArray
3738
*/
38-
public function getGrouppedTraces(): array {
39+
public function getGrouppedTraces(): array
40+
{
3941
return $this->results;
4042
}
41-
}
43+
}

tests/ProcessorTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public function testMemoryProfiling(int $batchLimit, int $samplesSent, string $t
199199
$sender
200200
->expects($this->exactly($samplesSent))
201201
->method('sendSample')
202-
->with(self::callback(function(Sample $sample) use($expectedSample): bool {
202+
->with(self::callback(function (Sample $sample) use ($expectedSample): bool {
203203
$this->assertEquals($expectedSample->samples, $sample->samples);
204204
$this->assertEquals($expectedSample->tags, $sample->tags);
205205
return true;
@@ -219,7 +219,8 @@ public function testMemoryProfiling(int $batchLimit, int $samplesSent, string $t
219219
$processor->process();
220220
}
221221

222-
public static function memorySamplesProvider(): Generator {
222+
public static function memorySamplesProvider(): Generator
223+
{
223224
yield 'It should send 1 samples (all 3 traces aggregated into 1 sample)' => [
224225
'batchLimit' => 3,
225226
'samplesSent' => 1,

0 commit comments

Comments
 (0)