From 6dde7c97cc67168ea121be872db46c0f99bc12db Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Wed, 13 Mar 2024 20:12:57 +0100 Subject: [PATCH] Faster `NamePrettifier->prettifyTestMethodName()` --- src/Logging/TestDox/NamePrettifier.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Logging/TestDox/NamePrettifier.php b/src/Logging/TestDox/NamePrettifier.php index 23426b2a810..1e5515884b6 100644 --- a/src/Logging/TestDox/NamePrettifier.php +++ b/src/Logging/TestDox/NamePrettifier.php @@ -23,7 +23,6 @@ use function is_bool; use function is_float; use function is_int; -use function is_numeric; use function is_object; use function is_scalar; use function method_exists; @@ -147,7 +146,7 @@ public function prettifyTestMethodName(string $name): string if ($i > 0 && $name[$i] >= 'A' && $name[$i] <= 'Z') { $buffer .= ' ' . strtolower($name[$i]); } else { - $isNumeric = is_numeric($name[$i]); + $isNumeric = $name[$i] >= '0' && $name[$i] <= '9'; if (!$wasNumeric && $isNumeric) { $buffer .= ' ';