File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 27
27
use function method_exists ;
28
28
use function preg_quote ;
29
29
use function preg_replace ;
30
- use function range ;
30
+ use function rtrim ;
31
31
use function sprintf ;
32
32
use function str_contains ;
33
33
use function str_ends_with ;
@@ -115,6 +115,7 @@ public function prettifyTestMethodName(string $name): string
115
115
}
116
116
117
117
$ string = rtrim ($ name , '0123456789 ' );
118
+
118
119
if (array_key_exists ($ string , self ::$ strings )) {
119
120
$ name = $ string ;
120
121
} elseif ($ string === $ name ) {
@@ -143,7 +144,9 @@ public function prettifyTestMethodName(string $name): string
143
144
144
145
$ buffer = '' ;
145
146
146
- foreach (range (0 , strlen ($ name ) - 1 ) as $ i ) {
147
+ $ len = strlen ($ name );
148
+
149
+ for ($ i = 0 ; $ i < $ len ; $ i ++) {
147
150
if ($ i > 0 && $ name [$ i ] >= 'A ' && $ name [$ i ] <= 'Z ' ) {
148
151
$ buffer .= ' ' . strtolower ($ name [$ i ]);
149
152
} else {
You can’t perform that action at this time.
0 commit comments