Skip to content

Commit

Permalink
Simplify NamePrettifier->prettifyTestMethodName()
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored and sebastianbergmann committed Mar 12, 2024
1 parent 9b96926 commit 13b893d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Logging/TestDox/NamePrettifier.php
Expand Up @@ -27,7 +27,6 @@
use function is_object;
use function is_scalar;
use function method_exists;
use function ord;
use function preg_quote;
use function preg_replace;
use function range;
Expand Down Expand Up @@ -145,9 +144,7 @@ public function prettifyTestMethodName(string $name): string
$wasNumeric = false;

foreach (range(0, strlen($name) - 1) as $i) {
$ord = ord($name[$i]);

if ($i > 0 && $ord >= 65 && $ord <= 90) {
if ($i > 0 && $name[$i] >= 'A' && $name[$i] <= 'Z') {
$buffer .= ' ' . strtolower($name[$i]);
} else {
$isNumeric = is_numeric($name[$i]);
Expand Down

0 comments on commit 13b893d

Please sign in to comment.