Skip to content

Commit ad2bbeb

Browse files
zonuexeondrejmirtes
authored andcommitted
Use str_starts_with() instead of strpos()
1 parent 7a6a575 commit ad2bbeb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Testing/TypeInferenceTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
use function is_string;
4242
use function preg_match;
4343
use function sprintf;
44+
use function str_starts_with;
4445
use function stripos;
45-
use function strpos;
4646
use function strtolower;
4747
use function version_compare;
4848
use const PHP_VERSION;
@@ -424,7 +424,7 @@ private static function isFileLintSkipped(string $file): bool
424424
}
425425

426426
// ignore shebang line
427-
if (strpos($firstLine, '#!') === 0) {
427+
if (str_starts_with($firstLine, '#!')) {
428428
$firstLine = fgets($f);
429429
if ($firstLine === false) {
430430
return false;

0 commit comments

Comments
 (0)