Exakat\Analyzer\Structures\StrposCompare::analyze PHP Method

analyze() public method

public analyze ( )
    public function analyze()
    {
        $operator = $this->loadIni('php_may_return_boolean_or_zero.ini', 'functions');
        // if (.. == strpos(..)) {}
        $this->atomIs('Functioncall')->_as('result')->codeIs($operator)->inIs('RIGHT')->atomIs('Comparison')->codeIs(array('==', '!='))->outIs('LEFT')->codeIs(array('0', "''", '""', 'null', 'false'))->back('result');
        $this->prepareQuery();
        // if (strpos(..) == ..) {}
        $this->atomIs('Functioncall')->_as('result')->codeIs($operator)->inIs('LEFT')->atomIs('Comparison')->codeIs(array('==', '!='))->outIs('RIGHT')->codeIs(array('0', "''", '""', 'null', 'false'))->back('result');
        $this->prepareQuery();
        // if (strpos(..)) {}
        $this->atomIs('Functioncall')->_as('result')->codeIs($operator)->inIs('CONDITION')->atomIs(array('Ifthen', 'While', 'Dowhile'))->back('result');
        $this->prepareQuery();
        // if ($x = strpos(..)) {}
        $this->atomIs('Functioncall')->codeIs($operator)->inIs('RIGHT')->_as('result')->atomIs('Assignation')->inIs('CONDITION')->atomIs(array('Ifthen', 'While', 'Dowhile'))->back('result');
        $this->prepareQuery();
    }
StrposCompare