Skip to content

Commit de35604

Browse files
committed
FileCreator is generating functionList without indexes
1 parent 021c433 commit de35604

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

generator/src/FileCreator.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,11 @@ public function generateFunctionsList(array $functions, string $path): void
9494
throw new \RuntimeException('Unable to write to '.$path);
9595
}
9696
fwrite($stream, "<?php\n
97-
return ".var_export($functionNames, true).";
98-
99-
");
97+
return [\n");
98+
foreach ($functionNames as $functionName) {
99+
fwrite($stream, ' '.\var_export($functionName, true).",\n");
100+
}
101+
fwrite($stream, "];\n");
100102
fclose($stream);
101103
}
102104

0 commit comments

Comments
 (0)