Skip to content

Commit

Permalink
Add warning when a function is not defined in stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Dec 3, 2020
1 parent 0c220ab commit 16eed88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/gen_stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -1576,6 +1576,7 @@ function replaceMethodSynopses(string $targetDirectory, array $funcMap, array $a
RecursiveIteratorIterator::LEAVES_ONLY
);

/** @var SplFileInfo $file */
foreach ($it as $file) {
$pathName = $file->getPathName();
if (!preg_match('/\.xml$/i', $pathName)) {
Expand Down Expand Up @@ -1630,6 +1631,7 @@ function replaceMethodSynopses(string $targetDirectory, array $funcMap, array $a
}
$funcName = $item->textContent;
if (!isset($funcMap[$funcName])) {
echo "Warning: Function $funcName() is not defined\n";
continue;
}
$funcInfo = $funcMap[$funcName];
Expand Down

0 comments on commit 16eed88

Please sign in to comment.