Code Duplication    Length = 3-3 lines in 3 locations

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

@@ 123-125 (lines=3) @@
120
        while (false !== $bytes = $os->read($startLength)) {
121
            $c = array();
122
123
            for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) {
124
                $c[] = self::$_byteMap[$bytes[$i]];
125
            }
126
127
            $size = count($c);
128
            $need = $this->_charReader->validateByteSequence($c, $size);
@@ 131-133 (lines=3) @@
128
            $need = $this->_charReader->validateByteSequence($c, $size);
129
            if ($need > 0 &&
130
                false !== $bytes = $os->read($need)) {
131
                for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) {
132
                    $c[] = self::$_byteMap[$bytes[$i]];
133
                }
134
            }
135
136
            $this->_array[] = $c;
@@ 315-317 (lines=3) @@
312
    {
313
        if (!feof($fp) && ($bytes = fread($fp, $len)) !== false) {
314
            $buf = array();
315
            for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) {
316
                $buf[] = self::$_byteMap[$bytes[$i]];
317
            }
318
319
            return $buf;
320
        }