Code Duplication    Length = 6-6 lines in 5 locations

code/converters/thirdparty/Services_JSON.php 5 locations

@@ 582-587 (lines=6) @@
579
                                $utf8 .= $chrs{$c};
580
                                break;
581
582
                            case ($ord_chrs_c & 0xE0) == 0xC0:
583
                                // characters U-00000080 - U-000007FF, mask 110XXXXX
584
                                //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
585
                                $utf8 .= substr($chrs, $c, 2);
586
                                ++$c;
587
                                break;
588
589
                            case ($ord_chrs_c & 0xF0) == 0xE0:
590
                                // characters U-00000800 - U-0000FFFF, mask 1110XXXX
@@ 589-594 (lines=6) @@
586
                                ++$c;
587
                                break;
588
589
                            case ($ord_chrs_c & 0xF0) == 0xE0:
590
                                // characters U-00000800 - U-0000FFFF, mask 1110XXXX
591
                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
592
                                $utf8 .= substr($chrs, $c, 3);
593
                                $c += 2;
594
                                break;
595
596
                            case ($ord_chrs_c & 0xF8) == 0xF0:
597
                                // characters U-00010000 - U-001FFFFF, mask 11110XXX
@@ 596-601 (lines=6) @@
593
                                $c += 2;
594
                                break;
595
596
                            case ($ord_chrs_c & 0xF8) == 0xF0:
597
                                // characters U-00010000 - U-001FFFFF, mask 11110XXX
598
                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
599
                                $utf8 .= substr($chrs, $c, 4);
600
                                $c += 3;
601
                                break;
602
603
                            case ($ord_chrs_c & 0xFC) == 0xF8:
604
                                // characters U-00200000 - U-03FFFFFF, mask 111110XX
@@ 603-608 (lines=6) @@
600
                                $c += 3;
601
                                break;
602
603
                            case ($ord_chrs_c & 0xFC) == 0xF8:
604
                                // characters U-00200000 - U-03FFFFFF, mask 111110XX
605
                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
606
                                $utf8 .= substr($chrs, $c, 5);
607
                                $c += 4;
608
                                break;
609
610
                            case ($ord_chrs_c & 0xFE) == 0xFC:
611
                                // characters U-04000000 - U-7FFFFFFF, mask 1111110X
@@ 610-615 (lines=6) @@
607
                                $c += 4;
608
                                break;
609
610
                            case ($ord_chrs_c & 0xFE) == 0xFC:
611
                                // characters U-04000000 - U-7FFFFFFF, mask 1111110X
612
                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
613
                                $utf8 .= substr($chrs, $c, 6);
614
                                $c += 5;
615
                                break;
616
617
                        }
618
                    }