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

analyze() public method

public analyze ( )
    public function analyze()
    {
        // $x *= 1;
        $this->atomIs('Assignation')->codeIs(array('*=', '/=', '%=', '**='))->outIs('RIGHT')->codeIs('1')->back('first');
        $this->prepareQuery();
        // $x = $y * 1
        $this->atomIs('Multiplication')->codeIs('*')->outIs(array('LEFT', 'RIGHT'))->codeIs('1')->back('first');
        $this->prepareQuery();
        $this->atomIs('Multiplication')->codeIs(array('/', '%'))->outIs('RIGHT')->codeIs('1')->back('first');
        $this->prepareQuery();
        // $x = $y ** 1
        $this->atomIs('Power')->outIs('RIGHT')->codeIs('1')->back('first');
        $this->prepareQuery();
        // 1 ** $a;
        $this->atomIs('Power')->outIs('LEFT')->codeIs(array('1', '0'))->back('first');
        $this->prepareQuery();
        // -0
        $this->atomIs('Integer')->codeIs('-0');
        $this->prepareQuery();
    }
MultiplyByOne