@@ -86,7 +86,7 @@ public function getOrRegisterCounter(string $namespace, string $name, string $he
86
86
* @param string $name e.g. duration_seconds
87
87
* @param string $help e.g. A histogram of the duration in seconds.
88
88
* @param string[] $labels e.g. ['controller', 'action']
89
- * @param float[] $buckets e.g. [100, 200, 300]
89
+ * @param float[]|null $buckets e.g. [100, 200, 300]
90
90
*
91
91
* @return Histogram
92
92
* @throws MetricsRegistrationException
@@ -96,7 +96,7 @@ public function registerHistogram(
96
96
string $ name ,
97
97
string $ help ,
98
98
array $ labels = [],
99
- array $ buckets = null
99
+ ? array $ buckets = null
100
100
): Histogram ;
101
101
102
102
/**
@@ -113,12 +113,18 @@ public function getHistogram(string $namespace, string $name): Histogram;
113
113
* @param string $name e.g. duration_seconds
114
114
* @param string $help e.g. A histogram of the duration in seconds.
115
115
* @param string[] $labels e.g. ['controller', 'action']
116
- * @param float[] $buckets e.g. [100, 200, 300]
116
+ * @param float[]|null $buckets e.g. [100, 200, 300]
117
117
*
118
118
* @return Histogram
119
119
* @throws MetricsRegistrationException
120
120
*/
121
- public function getOrRegisterHistogram (string $ namespace , string $ name , string $ help , array $ labels = [], array $ buckets = null ): Histogram ;
121
+ public function getOrRegisterHistogram (
122
+ string $ namespace ,
123
+ string $ name ,
124
+ string $ help ,
125
+ array $ labels = [],
126
+ ?array $ buckets = null
127
+ ): Histogram ;
122
128
123
129
/**
124
130
* @param string $namespace e.g. cms
@@ -137,7 +143,7 @@ public function registerSummary(
137
143
string $ help ,
138
144
array $ labels = [],
139
145
int $ maxAgeSeconds = 86400 ,
140
- array $ quantiles = null
146
+ ? array $ quantiles = null
141
147
): Summary ;
142
148
143
149
/**
@@ -160,5 +166,12 @@ public function getSummary(string $namespace, string $name): Summary;
160
166
* @return Summary
161
167
* @throws MetricsRegistrationException
162
168
*/
163
- public function getOrRegisterSummary (string $ namespace , string $ name , string $ help , array $ labels = [], int $ maxAgeSeconds = 86400 , array $ quantiles = null ): Summary ;
169
+ public function getOrRegisterSummary (
170
+ string $ namespace ,
171
+ string $ name ,
172
+ string $ help ,
173
+ array $ labels = [],
174
+ int $ maxAgeSeconds = 86400 ,
175
+ ?array $ quantiles = null
176
+ ): Summary ;
164
177
}
0 commit comments