CodeExplorer setSafeVars example
private function isSafeFor(string
$type, Node
$expression, Environment
$env): bool
{ $safe =
$this->safeAnalysis->
getSafe($expression);
if (null ===
$safe) { if (null ===
$this->traverser
) { $this->traverser =
new NodeTraverser($env,
[$this->safeAnalysis
]);
} $this->safeAnalysis->
setSafeVars($this->safeVars
);
$this->traverser->
traverse($expression);
$safe =
$this->safeAnalysis->
getSafe($expression);
} return \
in_array($type,
$safe) || \
in_array('all',
$safe);
} private function needEscaping(Environment
$env) { if (\
count($this->statusStack
)) {