Exakat\Analyzer\Structures\BreakOutsideLoop::analyze PHP Метод

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

public analyze ( )
    public function analyze()
    {
        $loops = '"Dowhile", "For", "Foreach", "While", "Switch"';
        // break (null)
        $this->atomIs('Break')->outIs('LEVEL')->atomIs('Void')->filter('it.in.loop(1){true}{it.object.atom in [' . $loops . ']}.any() == false')->back('first');
        $this->prepareQuery();
        // break 1
        $this->atomIs('Break')->outIs('LEVEL')->atomIs('Integer')->savePropertyAs('code', 'counter')->filter('it.in.loop(1){true}{ it.object.atom in [' . $loops . '] }.count() < counter.toInteger()')->back('first');
        $this->prepareQuery();
        // continue (null)
        $this->atomIs('Continue')->outIs('LEVEL')->atomIs('Void')->filter('it.in.loop(1){true}{it.object.atom in [' . $loops . ']}.any() == false')->back('first');
        $this->prepareQuery();
        // continue 1
        $this->atomIs('Continue')->outIs('LEVEL')->atomIs('Integer')->savePropertyAs('code', 'counter')->filter('it.in.loop(1){true}{ it.object.atom in [' . $loops . '] }.count() < counter.toInteger()')->back('first');
        $this->prepareQuery();
    }
BreakOutsideLoop