Browse Source

gen_stub: avoid unneeded regex match

pull/7865/merge
Daniel Scherzer 5 months ago
parent
commit
5ae87ffef4
  1. 2
      build/gen_stub.php

2
build/gen_stub.php

@ -54,7 +54,7 @@ function processDirectory(string $dir, Context $context): array {
);
foreach ($it as $file) {
$pathName = $file->getPathName();
if (preg_match('/\.stub\.php$/', $pathName)) {
if (substr($pathName, -9) === '.stub.php') {
$pathNames[] = $pathName;
}
}

Loading…
Cancel
Save