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

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