@@ -16,8 +16,6 @@ class SpeedTrapListener implements TestListener
16
16
*
17
17
* Increments as more suites are run, then decremented as they finish. All
18
18
* suites have been run when returns to 0.
19
- *
20
- * @var int
21
19
*/
22
20
protected $ suites = 0 ;
23
21
@@ -38,18 +36,11 @@ class SpeedTrapListener implements TestListener
38
36
39
37
/**
40
38
* Collection of slow tests.
41
- * Keys are labels describing the test (string)
42
- * Values are total execution time of given test (int)
43
- *
44
- * @var array
39
+ * Keys (string) => Printable label describing the test
40
+ * Values (int) => Test execution time, in milliseconds
45
41
*/
46
42
protected $ slow = [];
47
43
48
- /**
49
- * Construct a new instance.
50
- *
51
- * @param array $options
52
- */
53
44
public function __construct (array $ options = [])
54
45
{
55
46
$ this ->loadOptions ($ options );
@@ -180,8 +171,7 @@ public function endTestSuite(TestSuite $suite)
180
171
* Whether the given test execution time is considered slow.
181
172
*
182
173
* @param int $time Test execution time in milliseconds
183
- * @param int $slowThreshold Test execution time at which a test should be considered slow (milliseconds)
184
- * @return bool
174
+ * @param int $slowThreshold Test execution time at which a test should be considered slow, in milliseconds
185
175
*/
186
176
protected function isSlow (int $ time , int $ slowThreshold ): bool
187
177
{
@@ -190,9 +180,6 @@ protected function isSlow(int $time, int $slowThreshold): bool
190
180
191
181
/**
192
182
* Stores a test as slow.
193
- *
194
- * @param TestCase $test
195
- * @param int $time Test execution time in milliseconds
196
183
*/
197
184
protected function addSlowTest (TestCase $ test , int $ time )
198
185
{
@@ -203,8 +190,6 @@ protected function addSlowTest(TestCase $test, int $time)
203
190
204
191
/**
205
192
* Whether at least one test has been considered slow.
206
- *
207
- * @return bool
208
193
*/
209
194
protected function hasSlowTests (): bool
210
195
{
@@ -213,9 +198,6 @@ protected function hasSlowTests(): bool
213
198
214
199
/**
215
200
* Convert PHPUnit's reported test time (microseconds) to milliseconds.
216
- *
217
- * @param float $time
218
- * @return int
219
201
*/
220
202
protected function toMilliseconds (float $ time ): int
221
203
{
@@ -224,9 +206,6 @@ protected function toMilliseconds(float $time): int
224
206
225
207
/**
226
208
* Label describing a test.
227
- *
228
- * @param TestCase $test
229
- * @return string
230
209
*/
231
210
protected function makeLabel (TestCase $ test ): string
232
211
{
@@ -235,8 +214,6 @@ protected function makeLabel(TestCase $test): string
235
214
236
215
/**
237
216
* Calculate number of tests to include in slowness report.
238
- *
239
- * @return int
240
217
*/
241
218
protected function getReportLength (): int
242
219
{
@@ -246,8 +223,6 @@ protected function getReportLength(): int
246
223
/**
247
224
* Calculate number of slow tests to be hidden from the slowness report
248
225
* due to list length.
249
- *
250
- * @return int
251
226
*/
252
227
protected function getHiddenCount (): int
253
228
{
@@ -298,8 +273,6 @@ protected function renderFooter()
298
273
299
274
/**
300
275
* Populate options into class internals.
301
- *
302
- * @param array $options
303
276
*/
304
277
protected function loadOptions (array $ options )
305
278
{
@@ -319,9 +292,6 @@ protected function loadOptions(array $options)
319
292
* \@slowThreshold 5000
320
293
* public function testLongRunningProcess() {}
321
294
* </code>
322
- *
323
- * @param TestCase $test
324
- * @return int
325
295
*/
326
296
protected function getSlowThreshold (TestCase $ test ): int
327
297
{
0 commit comments