Code Duplication    Length = 4-4 lines in 2 locations

lib/Cpdf.php 2 locations

@@ 3982-3985 (lines=4) @@
3979
                if ($c <= 0x7F) {
3980
                    $unicode[] = $c; // use the character "as is" because is ASCII
3981
                    $numbytes = 1;
3982
                } elseif (($c >> 0x05) === 0x06) { // 2 bytes character (0x06 = 110 BIN)
3983
                    $bytes[] = ($c - 0xC0) << 0x06;
3984
                    $numbytes = 2;
3985
                } elseif (($c >> 0x04) === 0x0E) { // 3 bytes character (0x0E = 1110 BIN)
3986
                    $bytes[] = ($c - 0xE0) << 0x0C;
3987
                    $numbytes = 3;
3988
                } elseif (($c >> 0x03) === 0x1E) { // 4 bytes character (0x1E = 11110 BIN)
@@ 3988-3991 (lines=4) @@
3985
                } elseif (($c >> 0x04) === 0x0E) { // 3 bytes character (0x0E = 1110 BIN)
3986
                    $bytes[] = ($c - 0xE0) << 0x0C;
3987
                    $numbytes = 3;
3988
                } elseif (($c >> 0x03) === 0x1E) { // 4 bytes character (0x1E = 11110 BIN)
3989
                    $bytes[] = ($c - 0xF0) << 0x12;
3990
                    $numbytes = 4;
3991
                } else {
3992
                    // use replacement character for other invalid sequences
3993
                    $unicode[] = 0xFFFD;
3994
                    $bytes = array();