Exakat\Analyzer\Classes\MakeGlobalAProperty::analyze PHP Метод

analyze() публичный Метод

public analyze ( )
    public function analyze()
    {
        // class x { function y() {global $a;}}
        $this->atomIs('Class')->outIs('BLOCK')->atomInside('Global')->_as('results')->goToFunction()->outIs('NAME')->codeIsNot('__construct')->back('results');
        $this->prepareQuery();
        // class x { function y() {$GLOBALS['a']...;}}
        $this->atomIs('Class')->outIs('BLOCK')->atomInside('Array')->outIs('VARIABLE')->codeIs('$GLOBALS')->inIs('VARIABLE')->_as('results')->goToFunction()->outIs('NAME')->codeIsNot('__construct')->back('results');
        $this->prepareQuery();
    }
MakeGlobalAProperty