Skip to content

Commit b90dee5

Browse files
staabmsebastianbergmann
authored andcommitted
Faster NamePrettifier->prettifyTestMethodName()
1 parent baa8671 commit b90dee5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Logging/TestDox/NamePrettifier.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use function is_bool;
2424
use function is_float;
2525
use function is_int;
26-
use function is_numeric;
2726
use function is_object;
2827
use function is_scalar;
2928
use function method_exists;
@@ -147,7 +146,7 @@ public function prettifyTestMethodName(string $name): string
147146
if ($i > 0 && $name[$i] >= 'A' && $name[$i] <= 'Z') {
148147
$buffer .= ' ' . strtolower($name[$i]);
149148
} else {
150-
$isNumeric = is_numeric($name[$i]);
149+
$isNumeric = $name[$i] >= '0' && $name[$i] <= '9';
151150

152151
if (!$wasNumeric && $isNumeric) {
153152
$buffer .= ' ';

0 commit comments

Comments
 (0)