Exakat\Analyzer\Constants\ConstRecommended::analyze PHP Метод

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

public analyze ( )
    public function analyze()
    {
        // define('const', literal);
        $this->atomFunctionIs('\\define')->outIs('ARGUMENTS')->_as('args')->outWithRank('ARGUMENT', 0)->atomIs('String')->back('args')->outWithRank('ARGUMENT', 1)->atomIs(array('String', 'Real', 'Integer', 'Boolean', 'Null', 'Staticconstant'))->hasNoOut('CONCAT')->back('first');
        $this->prepareQuery();
        // define('const', other constant);
        $this->atomFunctionIs('\\define')->outIs('ARGUMENTS')->_as('args')->outWithRank('ARGUMENT', 0)->atomIs('String')->back('args')->outWithRank('ARGUMENT', 1)->atomIs(array('Identifier', 'Nsname'))->analyzerIs('Constants/ConstantUsage')->back('first');
        $this->prepareQuery();
        // define('const', expression);
        $this->atomFunctionIs('\\define')->outIs('ARGUMENTS')->_as('args')->outWithRank('ARGUMENT', 0)->atomIs('String')->back('args')->outWithRank('ARGUMENT', 1)->atomIsNot(array('Identifier', 'Nsname', 'String', 'Real', 'Integer', 'Boolean', 'Null', 'Staticconstant', 'Variable'))->noAtomInside(array("Variable", "Functioncall"))->back('first');
        $this->prepareQuery();
    }
ConstRecommended