Exakat\Analyzer\Variables\IsModified::analyze PHP Method

analyze() public method

public analyze ( )
    public function analyze()
    {
        $atoms = 'Variable';
        $this->atomIs($atoms)->inIsIE('VARIABLE')->hasIn(array('PREPLUSPLUS', 'POSTPLUSPLUS', 'DEFINE', 'CAST'))->back('first');
        $this->prepareQuery();
        $this->atomIs($atoms)->inIsIE(array('VARIABLE', 'APPEND'))->inIs(array('LEFT', 'VARIABLE'))->atomIs(array('Assignation', 'Arrayappend'))->hasNoIn('VARIABLE')->back('first');
        $this->prepareQuery();
        // catch
        $this->atomIs($atoms)->inIs('VARIABLE')->atomIs('Catch')->back('first');
        $this->prepareQuery();
        // arguments : reference variable in a custom function
        $this->atomIs($atoms)->savePropertyAs('rank', 'rank')->inIs('ARGUMENT')->inIs('ARGUMENTS')->hasNoIn('METHOD')->tokenIs(array('T_STRING', 'T_NS_SEPARATOR'))->functionDefinition()->outIs('ARGUMENTS')->outIs('ARGUMENT')->samePropertyAs('rank', 'rank')->is('reference', true)->back('first');
        $this->prepareQuery();
        // function/methods definition : all modified by incoming values
        // simple variable
        $this->atomIs('Function')->outIs('ARGUMENTS')->outIs('ARGUMENT')->atomIs($atoms);
        $this->prepareQuery();
        // simple variable + default value : already done in line 18
        // typehint
        $this->atomIs('Function')->outIs('ARGUMENTS')->outIs('ARGUMENT')->outIs('TYPEHINT')->atomIs($atoms);
        $this->prepareQuery();
        // PHP functions that are using references
        $data = new Methods();
        $functions = $data->getFunctionsReferenceArgs();
        $references = array();
        foreach ($functions as $function) {
            if (!isset($references[$function['position']])) {
                $references[$function['position']] = array('\\' . $function['function']);
            } else {
                $references[$function['position']][] = '\\' . $function['function'];
            }
        }
        foreach ($references as $position => $functions) {
            $this->atomIs($atoms)->inIsIE('VARIABLE')->is('rank', $position)->inIs('ARGUMENT')->inIs('ARGUMENTS')->hasNoIn('METHOD')->atomIs('Functioncall')->tokenIs(array('T_STRING', 'T_NS_SEPARATOR', 'T_UNSET'))->fullnspathIs($functions)->back('first');
            $this->prepareQuery();
        }
        // Class constructors (__construct)
        $this->atomIs($atoms)->savePropertyAs('rank', 'rank')->inIs('ARGUMENT')->inIs('ARGUMENTS')->hasNoIn('METHOD')->tokenIs(array('T_STRING', 'T_NS_SEPARATOR'))->atomIs('Functioncall')->hasIn('NEW')->classDefinition()->outIs('BLOCK')->outIs('ELEMENT')->analyzerIs('Classes/Constructor')->outIs('ARGUMENTS')->outIs('ARGUMENT')->samePropertyAs('rank', 'rank')->is('reference', true)->back('first');
        $this->prepareQuery();
    }