From a416cd790e58e15fbf70ad741abe445665079475 Mon Sep 17 00:00:00 2001 From: Anton Date: Sat, 23 Nov 2024 01:06:35 +0800 Subject: [PATCH] Explicit nullable types --- src/Prometheus/RegistryInterface.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Prometheus/RegistryInterface.php b/src/Prometheus/RegistryInterface.php index a66ae5e6..b4605cf1 100644 --- a/src/Prometheus/RegistryInterface.php +++ b/src/Prometheus/RegistryInterface.php @@ -96,7 +96,7 @@ public function registerHistogram( string $name, string $help, array $labels = [], - array $buckets = null + ?array $buckets = null ): Histogram; /** @@ -118,7 +118,7 @@ public function getHistogram(string $namespace, string $name): Histogram; * @return Histogram * @throws MetricsRegistrationException */ - public function getOrRegisterHistogram(string $namespace, string $name, string $help, array $labels = [], array $buckets = null): Histogram; + public function getOrRegisterHistogram(string $namespace, string $name, string $help, array $labels = [], ?array $buckets = null): Histogram; /** * @param string $namespace e.g. cms @@ -137,7 +137,7 @@ public function registerSummary( string $help, array $labels = [], int $maxAgeSeconds = 86400, - array $quantiles = null + ?array $quantiles = null ): Summary; /** @@ -160,5 +160,5 @@ public function getSummary(string $namespace, string $name): Summary; * @return Summary * @throws MetricsRegistrationException */ - public function getOrRegisterSummary(string $namespace, string $name, string $help, array $labels = [], int $maxAgeSeconds = 86400, array $quantiles = null): Summary; + public function getOrRegisterSummary(string $namespace, string $name, string $help, array $labels = [], int $maxAgeSeconds = 86400, ?array $quantiles = null): Summary; }