Skip to content

Commit a98cdad

Browse files
committed
Add void return type
1 parent a3bfd81 commit a98cdad

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

UPGRADE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The `SpeedTrap` Extension must be registered differently in `phpunit.xml`:
3333
If you have extended the old `JohnKary\PHPUnit\Listener\SpeedTrapListener`, you
3434
must extend the new `JohnKary\PHPUnit\Extension\SpeedTrap`. There are various
3535
method name changes that may affect your custom subclass. See [PR #83](https://github.com/johnkary/phpunit-speedtrap/pull/83)
36-
for how the new class has changed.
36+
for many of the new class has changed.
3737

3838
UPGRADE FROM 3.x to 4.0
3939
=======================

src/SpeedTrap.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ protected function isSlow(int $time, int $slowThreshold): bool
124124
*
125125
* @param int $time Test execution time that was considered slow, in milliseconds
126126
*/
127-
protected function addSlowTest(string $test, int $time)
127+
protected function addSlowTest(string $test, int $time): void
128128
{
129129
$label = $this->makeLabel($test);
130130

@@ -193,15 +193,15 @@ protected function getHiddenCount(): int
193193
/**
194194
* Renders slowness report header.
195195
*/
196-
protected function renderHeader()
196+
protected function renderHeader(): void
197197
{
198198
echo sprintf("\n\nYou should really speed up these slow tests (>%sms)...\n", $this->slowThreshold);
199199
}
200200

201201
/**
202202
* Renders slowness report body.
203203
*/
204-
protected function renderBody()
204+
protected function renderBody(): void
205205
{
206206
$slowTests = $this->slow;
207207

@@ -217,7 +217,7 @@ protected function renderBody()
217217
/**
218218
* Renders slowness report footer.
219219
*/
220-
protected function renderFooter()
220+
protected function renderFooter(): void
221221
{
222222
if ($hidden = $this->getHiddenCount()) {
223223
printf("...and there %s %s more above your threshold hidden from view\n", $hidden == 1 ? 'is' : 'are', $hidden);
@@ -227,7 +227,7 @@ protected function renderFooter()
227227
/**
228228
* Populate options into class internals.
229229
*/
230-
protected function loadOptions(array $options)
230+
protected function loadOptions(array $options): void
231231
{
232232
$this->slowThreshold = $options['slowThreshold'] ?? 500;
233233
$this->reportLength = $options['reportLength'] ?? 10;

0 commit comments

Comments
 (0)