src/Jit/Patcher/Monkey.php
protected function _flushVariables($node)
    {
        if (!$this->_variables[$this->_depth]) {
            return;
        }

        $body = '';
        foreach ($this->_variables[$this->_depth] as $variable) {
            $body .= $variable['name'] . $variable['patch'];
        }

        if (!$node->inPhp) {
            $body = '<?php ' . $body . ' ?>';
        }

        $patch = new NodeDef($body, 'code');
        $patch->parent = $node;
        $patch->function = $node->function;
        $patch->namespace = $node->namespace;
        array_unshift($node->tree, $patch);
        $this->_variables[$this->_depth] = [];
    }
protected function _flushVariables($node)
    {
        if (!$this->_variables[$this->_depth]) {
            return;
        }

        $body = '';
        foreach ($this->_variables[$this->_depth] as $variable) {
            $body .= $variable['name'] . $variable['patch'];
        }

        if (!$node->inPhp) {
            $body = '<?php ' . $body . ' ?>';
        }

        $patch = new NodeDef($body, 'code');
        $patch->parent = $node;
        $patch->function = $node->function;
        $patch->namespace = $node->namespace;
        array_unshift($node->tree, $patch);
        $this->_variables[$this->_depth] = [];
    }
protected function _flushVariables ( $ node ) { if ( ! $ this -> _variables [ $ this -> _depth ] ) { return ; } $ body = '' ; foreach ( $ this -> _variables [ $ this -> _depth ] as $ variable ) { $ body .= $ variable [ 'name' ] . $ variable [ 'patch' ] ; } if ( ! $ node -> inPhp ) { $ body = '<?php ' . $ body . ' ?>' ; } $ patch = new NodeDef ( $ body , 'code' ) ; $ patch -> parent = $ node ; $ patch -> function = $ node -> function ; $ patch -> namespace = $ node -> namespace ; array_unshift ( $ node -> tree , $ patch ) ; $ this -> _variables [ $ this -> _depth ] = [ ] ; }
Flush stored variables in the passed node.

@param array $node The node to store variables in.
Flush stored variables in the passed node .