Exakat\Analyzer\Classes\UsedPrivateMethod::analyze PHP Метод

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

public analyze ( )
    public function analyze()
    {
        // method used in a static methodcall \a\b::b()
        $this->atomIs('Class')->hasName()->savePropertyAs('fullnspath', 'classname')->outIs('BLOCK')->outIs('ELEMENT')->atomIs('Function')->_as('method')->hasOut('PRIVATE')->outIs('NAME')->savePropertyAs('code', 'name')->inIs('NAME')->inIs('ELEMENT')->atomInside('Staticmethodcall')->outIs('CLASS')->tokenIs(array('T_STRING', 'T_NS_SEPARATOR'))->samePropertyAs('fullnspath', 'classname')->inIs('CLASS')->outIs('METHOD')->samePropertyAs('code', 'name')->back('method');
        $this->prepareQuery();
        // method used in a static methodcall static::b() or self
        $this->atomIs('Class')->outIs('BLOCK')->outIs('ELEMENT')->atomIs('Function')->_as('method')->hasOut('PRIVATE')->outIs('NAME')->savePropertyAs('code', 'name')->inIs('NAME')->inIs('ELEMENT')->atomInside('Staticmethodcall')->outIs('CLASS')->tokenIs(array('T_STRING', 'T_NS_SEPARATOR', 'T_STATIC'))->codeIs(array('static', 'self'))->inIs('CLASS')->outIs('METHOD')->samePropertyAs('code', 'name')->back('method');
        $this->prepareQuery();
        // method used in a normal methodcall with $this $this->b()
        $this->atomIs('Class')->outIs('BLOCK')->outIs('ELEMENT')->atomIs('Function')->_as('method')->hasOut('PRIVATE')->outIs('NAME')->savePropertyAs('code', 'name')->inIs('NAME')->inIs('ELEMENT')->atomInside('Methodcall')->outIs('OBJECT')->codeIs('$this')->inIs('OBJECT')->outIs('METHOD')->samePropertyAs('code', 'name')->back('method');
        $this->prepareQuery();
        // method used in a new (constructor)
        $this->atomIs('Class')->savePropertyAs('fullnspath', 'fnp')->outIs('BLOCK')->outIs('ELEMENT')->atomIs('Function')->hasOut('PRIVATE')->_as('method')->outIs('NAME')->codeIs('__construct')->inIs('NAME')->inIs('ELEMENT')->inIs('BLOCK')->atomInside('New')->outIs('NEW')->tokenIs(array('T_STRING', 'T_NS_SEPARATOR'))->samePropertyAs('fullnspath', 'fnp')->back('method');
        $this->prepareQuery();
        // __destruct is considered automatically checked
        $this->atomIs('Class')->outIs('BLOCK')->outIs('ELEMENT')->atomIs('Function')->hasOut('PRIVATE')->outIs('NAME')->codeIs('__destruct')->inIs('NAME');
        $this->prepareQuery();
    }
UsedPrivateMethod