Code Duplication    Length = 6-6 lines in 2 locations

lib/classes/Swift/CharacterStream/ArrayCharacterStream.php 2 locations

@@ 170-175 (lines=6) @@
167
        // Don't use array slice
168
        $arrays = array();
169
        $end = $length + $this->_offset;
170
        for ($i = $this->_offset; $i < $end; ++$i) {
171
            if (!isset($this->_array[$i])) {
172
                break;
173
            }
174
            $arrays[] = $this->_array[$i];
175
        }
176
177
        $this->_offset += $i - $this->_offset; // Limit function calls
178
@@ 203-208 (lines=6) @@
200
201
        $arrays = array();
202
        $end = $length + $this->_offset;
203
        for ($i = $this->_offset; $i < $end; ++$i) {
204
            if (!isset($this->_array[$i])) {
205
                break;
206
            }
207
            $arrays[] = $this->_array[$i];
208
        }
209
210
        $this->_offset += ($i - $this->_offset); // Limit function calls
211