Exakat\Analyzer\Common\ClassUsage::analyze PHP Method

analyze() public method

public analyze ( )
    public function analyze()
    {
        $classes = $this->makeFullNsPath($this->classes);
        $this->atomIs('New')->outIs('NEW')->tokenIs(array('T_STRING', 'T_NS_SEPARATOR'))->atomIsNot('Array')->fullnspathIs($classes);
        $this->prepareQuery();
        $this->atomIs('Staticmethodcall')->outIs('CLASS')->tokenIs(array('T_STRING', 'T_NS_SEPARATOR'))->atomIsNot('Array')->fullnspathIs($classes);
        $this->prepareQuery();
        $this->atomIs('Staticproperty')->outIs('CLASS')->tokenIs(array('T_STRING', 'T_NS_SEPARATOR'))->atomIsNot('Array')->fullnspathIs($classes);
        $this->prepareQuery();
        $this->atomIs('Staticconstant')->outIs('CLASS')->tokenIs(array('T_STRING', 'T_NS_SEPARATOR'))->atomIsNot('Array')->fullnspathIs($classes);
        $this->prepareQuery();
        $this->atomIs('Catch')->outIs('CLASS')->tokenIs(array('T_STRING', 'T_NS_SEPARATOR'))->fullnspathIs($classes);
        $this->prepareQuery();
        $this->atomIs(array('Nsname', 'Identifier'))->hasIn('TYPEHINT')->tokenIs(array('T_STRING', 'T_NS_SEPARATOR'))->fullnspathIs($classes);
        $this->prepareQuery();
        $this->atomIs('Instanceof')->outIs('CLASS')->tokenIs(array('T_STRING', 'T_NS_SEPARATOR'))->atomIsNot(array('Array', 'Null', 'Boolean'))->fullnspathIs($classes);
        $this->prepareQuery();
        $this->atomIs('Class')->outIs(array('EXTENDS', 'IMPLEMENTS'))->tokenIs(array('T_STRING', 'T_NS_SEPARATOR'))->fullnspathIs($classes);
        $this->prepareQuery();
        // Check that... Const/function and aliases
        $this->atomIs('Use')->outIs('USE')->outIsIE('NAME')->tokenIs(array('T_STRING', 'T_NS_SEPARATOR'))->fullnspathIs($classes);
        $this->prepareQuery();
    }

Usage Example

Example #1
0
 public function analyze()
 {
     $this->classes = array('\\cake\\utility\\crypto\\mcrypt', '\\cake\\network\\http\\client');
     return parent::analyze();
 }
All Usage Examples Of Exakat\Analyzer\Common\ClassUsage::analyze
ClassUsage