Exakat\Analyzer\Variables\Globals::analyze PHP Method

analyze() public method

public analyze ( )
    public function analyze()
    {
        // Global in a function
        $this->atomIs('Global')->outIs('GLOBAL')->atomIs('Variable')->savePropertyAs('code', 'name')->goToFunction()->outIs('BLOCK')->atomInside('Variable')->samePropertyAs('code', 'name');
        $this->prepareQuery();
        // Global in a function
        $this->atomIs('Variable')->codeIs('$GLOBALS')->inIs('VARIABLE')->atomIs('Array');
        $this->prepareQuery();
        // implicit global
        $this->atomIs('Variable')->codeIsNot(array('$GLOBALS', '$_POST'))->hasNoClassInterfaceTrait()->hasNoFunction();
        $this->prepareQuery();
    }
Globals