mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-08 02:52:49 +08:00
完成变量混淆
This commit is contained in:
@@ -6,6 +6,7 @@ namespace app\common\command\build;
|
||||
|
||||
use app\common\tools\PathTools;
|
||||
use app\common\tools\phpparser\MinifyPrinterTools;
|
||||
use app\common\tools\phpparser\NodeFakeVarVisitorTools;
|
||||
use app\common\tools\phpparser\NodeVisitorTools;
|
||||
use League\Flysystem\Adapter\Local;
|
||||
use League\Flysystem\Filesystem;
|
||||
@@ -313,6 +314,11 @@ class Dist extends Command
|
||||
}
|
||||
}
|
||||
|
||||
$traverser = new NodeTraverser();
|
||||
|
||||
$traverser->addVisitor(new NodeFakeVarVisitorTools);
|
||||
|
||||
$stmts = $traverser->traverse($stmts);
|
||||
|
||||
$newCode = $prettyPrinter->prettyPrintFile($stmts);
|
||||
|
||||
@@ -410,6 +416,12 @@ class Dist extends Command
|
||||
}
|
||||
|
||||
|
||||
$traverser = new NodeTraverser();
|
||||
|
||||
$traverser->addVisitor(new NodeFakeVarVisitorTools);
|
||||
|
||||
$function_stmts = $traverser->traverse($function_stmts);
|
||||
|
||||
$prettyPrinter = new MinifyPrinterTools();
|
||||
|
||||
$function_code = $prettyPrinter->prettyPrintFile($function_stmts);
|
||||
|
||||
Reference in New Issue
Block a user