Skip to content

Commit 1de5202

Browse files
authored
ref: replace str_starts_with with strpos in ClockMock (#1936)
1 parent bc33d2b commit 1de5202

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Util/ClockMock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public static function register($class): void
146146
if (strpos($class, '\\Tests\\') > 0) {
147147
$ns = str_replace('\\Tests\\', '\\', $class);
148148
$mockedNs[] = substr($ns, 0, strrpos($ns, '\\'));
149-
} elseif (str_starts_with($class, 'Tests\\')) {
149+
} elseif (strpos($class, 'Tests\\') === 0) {
150150
$mockedNs[] = substr($class, 6, strrpos($class, '\\') - 6);
151151
}
152152
foreach ($mockedNs as $ns) {

0 commit comments

Comments
 (0)