Skip to content

Commit cae2dcf

Browse files
committed
chore(usage): apply formatter and refresh PHPStan baseline
1 parent 90298f6 commit cae2dcf

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

tests/Usage/Adapter/ClickHouseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ public function testEventsSchemaPersistsAllNewColumns(): void
402402
// Filtering on each indexed dimension should be schema-valid.
403403
foreach (['service', 'resourceInternalId', 'teamId', 'teamInternalId', 'region', 'hostname', 'osName', 'clientName', 'deviceName'] as $col) {
404404
$value = $tags[$col];
405-
$expected = ($col === 'country' || $col === 'region') ? strtolower($value) : $value;
405+
$expected = $col === 'region' ? strtolower($value) : $value;
406406
$rows = $this->usage->find([
407407
\Utopia\Query\Query::equal('metric', ['schema-roundtrip']),
408408
\Utopia\Query\Query::equal($col, [$expected]),

tests/Usage/MetricTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ public function testEventIndexesCoverNewFilterableColumns(): void
9999
{
100100
$indexed = [];
101101
foreach (Metric::getEventIndexes() as $idx) {
102-
$indexed = array_merge($indexed, $idx['attributes']);
102+
/** @var array<int, string> $attrs */
103+
$attrs = $idx['attributes'];
104+
$indexed = array_merge($indexed, $attrs);
103105
}
104106
foreach ([
105107
'path', 'method', 'status', 'service', 'resource',
@@ -115,7 +117,9 @@ public function testGaugeIndexesCoverIdColumns(): void
115117
{
116118
$indexed = [];
117119
foreach (Metric::getGaugeIndexes() as $idx) {
118-
$indexed = array_merge($indexed, $idx['attributes']);
120+
/** @var array<int, string> $attrs */
121+
$attrs = $idx['attributes'];
122+
$indexed = array_merge($indexed, $attrs);
119123
}
120124
foreach (['resourceId', 'resourceInternalId', 'teamId', 'teamInternalId'] as $col) {
121125
$this->assertContains($col, $indexed);

0 commit comments

Comments
 (0)