We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b2df3b commit b1710f4Copy full SHA for b1710f4
build/gen_stub.php
@@ -83,7 +83,7 @@ function processDirectory(string $dir, Context $context): array {
83
);
84
foreach ($it as $file) {
85
$pathName = $file->getPathName();
86
- if (substr($pathName, -9) === '.stub.php') {
+ if (str_ends_with($pathName, '.stub.php')) {
87
$pathNames[] = $pathName;
88
}
89
@@ -5968,7 +5968,7 @@ function initPhpParser() {
5968
5969
5970
spl_autoload_register(static function(string $class) use ($phpParserDir) {
5971
- if (strpos($class, "PhpParser\\") === 0) {
+ if (str_starts_with($class, "PhpParser\\")) {
5972
$fileName = $phpParserDir . "/lib/" . str_replace("\\", "/", $class) . ".php";
5973
require $fileName;
5974
0 commit comments