Naneau\Obfuscator\Node\Visitor\ScramblePrivateMethod::variableMethodCallsUsed PHP Method

variableMethodCallsUsed() private method

Recursively scan for method calls and see if variables are used
private variableMethodCallsUsed ( array $nodes ) : void
$nodes array
return void
    private function variableMethodCallsUsed(array $nodes)
    {
        foreach ($nodes as $node) {
            if ($node instanceof MethodCall && $node->name instanceof Variable) {
                // A method call uses a Variable as its name
                return true;
            }
            // Recurse over child nodes
            if (isset($node->stmts) && is_array($node->stmts)) {
                $used = $this->variableMethodCallsUsed($node->stmts);
                if ($used) {
                    return true;
                }
            }
        }
        return false;
    }