Skip to content

Commit 5c832bb

Browse files
Fixed types
1 parent 8995927 commit 5c832bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Prometheus/Prometheus.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ protected function setTimestamp(string $metricName, array $matches): void
196196

197197

198198
/**
199-
* @return string[]
199+
* @return array<string, float|int|string>
200200
*/
201201
protected function extractLabels(string $rawLabels): array
202202
{
@@ -212,7 +212,7 @@ protected function extractLabels(string $rawLabels): array
212212
foreach ($matches['label'] as $key => $label) {
213213
$value = $matches['value'][$key];
214214

215-
$labels[$label] = is_numeric($value) ? +$value : $value;
215+
$labels[(string) $label] = is_numeric($value) ? +$value : $value;
216216
}
217217
}
218218

0 commit comments

Comments
 (0)