From ca9dbd5307b9a1f280d2200778ac6fcd5cf30f73 Mon Sep 17 00:00:00 2001 From: augushong Date: Sat, 19 Nov 2022 17:48:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E5=92=8C=E8=B7=AF=E7=94=B1=E5=A2=9E=E5=8A=A0=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=B7=B7=E6=B7=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/command/build/Dist.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/common/command/build/Dist.php b/app/common/command/build/Dist.php index f216552..bc0f891 100644 --- a/app/common/command/build/Dist.php +++ b/app/common/command/build/Dist.php @@ -226,6 +226,12 @@ class Dist extends Command } }); + + $traverser_var_faker = new NodeTraverser(); + $traverser_var_faker->addVisitor(new NodeFakeVarVisitorTools); + + $file_stmts = $traverser_var_faker->traverse($file_stmts); + $function_code = $prettyPrinter->prettyPrintFile($file_stmts); $this->distFilesystem->put($item_file['path'], $function_code); @@ -285,9 +291,14 @@ class Dist extends Command } }); - $file_stmts = $traverser->traverse($file_stmts); + $traverser_var_faker = new NodeTraverser(); + $traverser_var_faker->addVisitor(new NodeFakeVarVisitorTools); + + $file_stmts = $traverser_var_faker->traverse($file_stmts); + + $function_code = $prettyPrinter->prettyPrintFile($file_stmts); $this->distFilesystem->put($item_file['path'], $function_code);