From 31eb85e0216a3b52de8421a412c8fa1cdf9145a8 Mon Sep 17 00:00:00 2001 From: Immanuel Klinkenberg Date: Thu, 26 Oct 2023 21:16:36 +0200 Subject: [PATCH] Added PHPStan ignore error lines --- src/Prometheus/CollectorRegistry.php | 2 +- src/Prometheus/Storage/RedisNg.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Prometheus/CollectorRegistry.php b/src/Prometheus/CollectorRegistry.php index 3a8ee688..8395c53e 100644 --- a/src/Prometheus/CollectorRegistry.php +++ b/src/Prometheus/CollectorRegistry.php @@ -83,7 +83,7 @@ public function wipeStorage(): void */ public function getMetricFamilySamples(bool $sortMetrics = true): array { - return $this->storageAdapter->collect($sortMetrics); + return $this->storageAdapter->collect($sortMetrics); /** @phpstan-ignore-line */ } /** diff --git a/src/Prometheus/Storage/RedisNg.php b/src/Prometheus/Storage/RedisNg.php index 13c13295..cb369ba7 100644 --- a/src/Prometheus/Storage/RedisNg.php +++ b/src/Prometheus/Storage/RedisNg.php @@ -475,7 +475,7 @@ private function collectHistograms(): array * * @return string */ - private function removePrefixFromKey(string $key): string + private function removePrefixFromKey(string $key): string /** @phpstan-ignore-line */ { // @phpstan-ignore-next-line false positive, phpstan thinks getOptions returns int if ($this->redis->getOption(\Redis::OPT_PREFIX) === null) {