Code Duplication    Length = 9-10 lines in 2 locations

lib/classes/Swift/CharacterStream/MbCharacterStream.php 1 location

@@ 87-96 (lines=10) @@
84
     *
85
     * @return int[]|bool
86
     */
87
    public function readBytes($length)
88
    {
89
        $read = $this->read($length);
90
91
        if ($read !== false) {
92
            return \array_map('\ord', \str_split($read, 1));
93
        }
94
95
        return false;
96
    }
97
98
    /**
99
     * @param Swift_CharacterReaderFactory $factory

lib/classes/Swift/CharacterStream/NgCharacterStream.php 1 location

@@ 227-235 (lines=9) @@
224
     *
225
     * @return int[]|false false on error
226
     */
227
    public function readBytes($length)
228
    {
229
        $read = $this->read($length);
230
        if ($read !== false) {
231
            return \array_map('\ord', \str_split($read, 1));
232
        }
233
234
        return false;
235
    }
236
237
    /**
238
     * @see Swift_CharacterStream::setPointer()