数据库配置脱敏

This commit is contained in:
2022-11-25 17:16:59 +08:00
parent e6bbdc0297
commit 9a04549c86

View File

@@ -4,6 +4,7 @@ namespace app\common\tools\phpparser;
use PhpOffice\PhpSpreadsheet\Calculation\Logical\Boolean;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\Cast\Bool_;
use PhpParser\Node\Expr\ConstFetch;
@@ -97,6 +98,11 @@ class ReadEnvVisitorNodeTools extends NodeVisitorAbstract
if (is_array($value)) {
return new Array_($value);
} else if (is_string($value)) {
return new FuncCall(new Name('base64_decode'), [
new Arg(new String_(base64_encode($value)))
]);
return new String_($value);
} else if (is_integer($value)) {
return new LNumber($value);