Skip to content

Commit 5c786ba

Browse files
gen_stub: avoid unneeded regex match
1 parent f51b78a commit 5c786ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/gen_stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function processDirectory(string $dir, Context $context): array {
5454
);
5555
foreach ($it as $file) {
5656
$pathName = $file->getPathName();
57-
if (preg_match('/\.stub\.php$/', $pathName)) {
57+
if (substr($pathName, -9) === '.stub.php') {
5858
$pathNames[] = $pathName;
5959
}
6060
}

0 commit comments

Comments
 (0)