Code Duplication    Length = 15-15 lines in 2 locations

lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php 1 location

@@ 81-95 (lines=15) @@
78
79
        while (false !== $bytes = $this->_nextSequence()) {
80
            // If we're filtering the input
81
            if (isset($this->_filter)) {
82
                // If we can't filter because we need more bytes
83
                while ($this->_filter->shouldBuffer($bytes)) {
84
                    // Then collect bytes into the buffer
85
                    if (false === $moreBytes = $this->_nextSequence(1)) {
86
                        break;
87
                    }
88
89
                    foreach ($moreBytes as $b) {
90
                        $bytes[] = $b;
91
                    }
92
                }
93
                // And filter them
94
                $bytes = $this->_filter->filter($bytes);
95
            }
96
97
            $enc = $this->_encodeByteSequence($bytes, $size);
98

lib/classes/Swift/Encoder/QpEncoder.php 1 location

@@ 194-208 (lines=15) @@
191
192
        while (false !== $bytes = $this->_nextSequence()) {
193
            // if we're filtering the input
194
            if (isset($this->_filter)) {
195
                // if we can't filter because we need more bytes
196
                while ($this->_filter->shouldBuffer($bytes)) {
197
                    // then collect bytes into the buffer
198
                    if (false === $moreBytes = $this->_nextSequence(1)) {
199
                        break;
200
                    }
201
202
                    foreach ($moreBytes as $b) {
203
                        $bytes[] = $b;
204
                    }
205
                }
206
                // and filter them
207
                $bytes = $this->_filter->filter($bytes);
208
            }
209
210
            $enc = $this->_encodeByteSequence($bytes, $size);
211