Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit nullable types #164

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
Loading