Skip to content

Commit

Permalink
Explicit nullable types
Browse files Browse the repository at this point in the history
  • Loading branch information
luzrain committed Nov 22, 2024
1 parent 50b70a6 commit a416cd7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Prometheus/RegistryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function registerHistogram(
string $name,
string $help,
array $labels = [],
array $buckets = null
?array $buckets = null
): Histogram;

/**
Expand All @@ -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
Expand All @@ -137,7 +137,7 @@ public function registerSummary(
string $help,
array $labels = [],
int $maxAgeSeconds = 86400,
array $quantiles = null
?array $quantiles = null
): Summary;

/**
Expand All @@ -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;
}

0 comments on commit a416cd7

Please sign in to comment.