Exakat\Analyzer\Php\ReservedNames::analyze PHP Method

analyze() public method

public analyze ( )
    public function analyze()
    {
        $reservedNames = $this->loadIni('php_keywords.ini', 'keyword');
        // functions/methods names
        $this->atomIs('Function')->outIs('NAME')->codeIs($reservedNames)->back('first');
        $this->prepareQuery();
        // classes
        $this->atomIs('Class')->outIs('NAME')->codeIs($reservedNames)->back('first');
        $this->prepareQuery();
        // trait
        $this->atomIs('Trait')->outIs('NAME')->codeIs($reservedNames)->back('first');
        $this->prepareQuery();
        // interface
        $this->atomIs('Interface')->outIs('NAME')->codeIs($reservedNames)->back('first');
        $this->prepareQuery();
        // methodcall
        $this->atomIs('Methodcall')->outIs('METHOD')->codeIs($reservedNames)->back('first');
        $this->prepareQuery();
        // property
        $this->atomIs('Property')->outIs('METHOD')->codeIs($reservedNames)->back('first');
        $this->prepareQuery();
        // variables
        foreach ($reservedNames as &$variable) {
            $variable = '$' . $variable;
        }
        unset($variable);
        $this->atomIs('Variable')->codeIs($reservedNames);
        $this->prepareQuery();
    }
ReservedNames