Skip to content

Commit d5bbb28

Browse files
committed
Move variable declaration closer to its usage
1 parent 610815c commit d5bbb28

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
@@ -743,7 +743,6 @@ function generateCodeWithConditions(
743743
}
744744

745745
function generateArgInfoCode(FileInfo $fileInfo): string {
746-
$generatedDeclarations = [];
747746
$funcInfos = $fileInfo->funcInfos;
748747

749748
$code = "/* This is a generated file, edit the .stub.php file instead. */\n";
@@ -768,6 +767,7 @@ function(FuncInfo $funcInfo) use(&$generatedFuncInfos) {
768767

769768
if ($fileInfo->generateFunctionEntries) {
770769
$code .= "\n\n";
770+
$generatedDeclarations = [];
771771
$code .= generateCodeWithConditions($funcInfos, "", function(FuncInfo $funcInfo) use (&$generatedDeclarations) {
772772
$name = $funcInfo->alias ?? $funcInfo->name;
773773
$key = "$name|$funcInfo->cond";

0 commit comments

Comments
 (0)