Exakat\Analyzer\Wordpress\NoGlobalModification::analyze PHP Метод

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

public analyze ( )
    public function analyze()
    {
        $globalNames = $this->loadIni('wp_globals.ini', 'globals');
        // global $post => $post++;
        $this->atomIs('Global')->outIs('GLOBAL')->atomIs('Variable')->codeIs($globalNames)->savePropertyAs('code', 'name')->goToFunction()->outIs('BLOCK')->atomInside('Variable')->samePropertyAs('code', 'name')->analyzerIs('Variables/IsModified')->back('first');
        $this->prepareQuery();
        // Drop the $ from variable names
        $globalNames = array_map(function ($x) {
            return substr($x, 1);
        }, $globalNames);
        // $GLOBALS['post']++;
        $this->atomIs('Array')->outIs('INDEX')->noDelimiterIs($globalNames)->inIs('INDEX')->outIs('VARIABLE')->atomIs('Variable')->codeIs('$GLOBALS')->analyzerIs('Variables/IsModified')->back('first');
        $this->prepareQuery();
    }
NoGlobalModification