@@ -95,7 +95,7 @@ public function getMetricFamilySamples(bool $sortMetrics = true): array
95
95
* @return Gauge
96
96
* @throws MetricsRegistrationException
97
97
*/
98
- public function registerGauge (string $ namespace , string $ name , string $ help , $ labels = []): Gauge
98
+ public function registerGauge (string $ namespace , string $ name , string $ help , array $ labels = []): Gauge
99
99
{
100
100
$ metricIdentifier = self ::metricIdentifier ($ namespace , $ name );
101
101
if (isset ($ this ->gauges [$ metricIdentifier ])) {
@@ -136,7 +136,7 @@ public function getGauge(string $namespace, string $name): Gauge
136
136
* @return Gauge
137
137
* @throws MetricsRegistrationException
138
138
*/
139
- public function getOrRegisterGauge (string $ namespace , string $ name , string $ help , $ labels = []): Gauge
139
+ public function getOrRegisterGauge (string $ namespace , string $ name , string $ help , array $ labels = []): Gauge
140
140
{
141
141
try {
142
142
$ gauge = $ this ->getGauge ($ namespace , $ name );
@@ -155,7 +155,7 @@ public function getOrRegisterGauge(string $namespace, string $name, string $help
155
155
* @return Counter
156
156
* @throws MetricsRegistrationException
157
157
*/
158
- public function registerCounter (string $ namespace , string $ name , string $ help , $ labels = []): Counter
158
+ public function registerCounter (string $ namespace , string $ name , string $ help , array $ labels = []): Counter
159
159
{
160
160
$ metricIdentifier = self ::metricIdentifier ($ namespace , $ name );
161
161
if (isset ($ this ->counters [$ metricIdentifier ])) {
@@ -196,7 +196,7 @@ public function getCounter(string $namespace, string $name): Counter
196
196
* @return Counter
197
197
* @throws MetricsRegistrationException
198
198
*/
199
- public function getOrRegisterCounter (string $ namespace , string $ name , string $ help , $ labels = []): Counter
199
+ public function getOrRegisterCounter (string $ namespace , string $ name , string $ help , array $ labels = []): Counter
200
200
{
201
201
try {
202
202
$ counter = $ this ->getCounter ($ namespace , $ name );
@@ -211,7 +211,7 @@ public function getOrRegisterCounter(string $namespace, string $name, string $he
211
211
* @param string $name e.g. duration_seconds
212
212
* @param string $help e.g. A histogram of the duration in seconds.
213
213
* @param string[] $labels e.g. ['controller', 'action']
214
- * @param mixed []|null $buckets e.g. [100, 200, 300]
214
+ * @param float []|null $buckets e.g. [100.0 , 200.0 , 300.0 ]
215
215
*
216
216
* @return Histogram
217
217
* @throws MetricsRegistrationException
@@ -221,7 +221,7 @@ public function registerHistogram(
221
221
string $ name ,
222
222
string $ help ,
223
223
array $ labels = [],
224
- array $ buckets = null
224
+ ? array $ buckets = null
225
225
): Histogram {
226
226
$ metricIdentifier = self ::metricIdentifier ($ namespace , $ name );
227
227
if (isset ($ this ->histograms [$ metricIdentifier ])) {
@@ -259,7 +259,7 @@ public function getHistogram(string $namespace, string $name): Histogram
259
259
* @param string $name e.g. duration_seconds
260
260
* @param string $help e.g. A histogram of the duration in seconds.
261
261
* @param string[] $labels e.g. ['controller', 'action']
262
- * @param float[]|null $buckets e.g. [100, 200, 300]
262
+ * @param float[]|null $buckets e.g. [100.0 , 200.0 , 300.0 ]
263
263
*
264
264
* @return Histogram
265
265
* @throws MetricsRegistrationException
@@ -269,7 +269,7 @@ public function getOrRegisterHistogram(
269
269
string $ name ,
270
270
string $ help ,
271
271
array $ labels = [],
272
- array $ buckets = null
272
+ ? array $ buckets = null
273
273
): Histogram {
274
274
try {
275
275
$ histogram = $ this ->getHistogram ($ namespace , $ name );
@@ -297,7 +297,7 @@ public function registerSummary(
297
297
string $ help ,
298
298
array $ labels = [],
299
299
int $ maxAgeSeconds = 600 ,
300
- array $ quantiles = null
300
+ ? array $ quantiles = null
301
301
): Summary {
302
302
$ metricIdentifier = self ::metricIdentifier ($ namespace , $ name );
303
303
if (isset ($ this ->summaries [$ metricIdentifier ])) {
@@ -348,7 +348,7 @@ public function getOrRegisterSummary(
348
348
string $ help ,
349
349
array $ labels = [],
350
350
int $ maxAgeSeconds = 600 ,
351
- array $ quantiles = null
351
+ ? array $ quantiles = null
352
352
): Summary {
353
353
try {
354
354
$ summary = $ this ->getSummary ($ namespace , $ name );
0 commit comments