Exakat\Analyzer\Classes\DefinedConstants::analyze PHP Method

analyze() public method

public analyze ( )
    public function analyze()
    {
        $containsConstantDefinition = 'where( __.out("BLOCK").out("ELEMENT").hasLabel("Const").out("CONST").out("NAME").filter{ it.get().value("code").toLowerCase() == constante.toLowerCase(); }.count().is(neq(0)) )';
        // constants defined at the class level
        $this->atomIs('Staticconstant')->outIs('CONSTANT')->savePropertyAs('code', 'constante')->inIs('CONSTANT')->outIs('CLASS')->classDefinition()->raw($containsConstantDefinition)->back('first');
        $this->prepareQuery();
        // constants defined at the parents level
        // This includes interfaces
        $this->atomIs('Staticconstant')->outIs('CONSTANT')->savePropertyAs('code', 'constante')->inIs('CONSTANT')->outIs('CLASS')->classDefinition()->goToAllParents()->raw($containsConstantDefinition)->back('first');
        $this->prepareQuery();
        // constants defined in a class of an extension
        $this->atomIs('Staticconstant')->outIs('CLASS')->analyzerIs('Classes/IsExtClass')->back('first');
        $this->prepareQuery();
        // constants defined in a class of an vendor library
        $this->atomIs('Staticconstant')->analyzerIs('Composer/IsComposerNsname');
        $this->prepareQuery();
    }
DefinedConstants