Skip to content

Commit

Permalink
Fix: Use sprintf()
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Feb 23, 2025
1 parent 1235304 commit 6d90185
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Reporter/DefaultReporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,13 @@ private function list(SlowTestList $slowTestList): array

$testDescription = $slowTest->testDescription()->toString();

return <<<TXT
{$formattedNumber}. {$formattedDuration} {$formattedMaximumDuration} {$testDescription}
TXT;
return \sprintf(
'%s. %s %s %s',
$formattedNumber,
$formattedDuration,
$formattedMaximumDuration,
$testDescription
);
}, \range(1, $slowTestListThatWillBeReported->slowTestCount()->toCount()->toInt()), $slowTestListThatWillBeReported->toArray());
}

Expand Down

0 comments on commit 6d90185

Please sign in to comment.