Code Duplication    Length = 13-13 lines in 17 locations

src/Parser.php 17 locations

@@ 460-472 (lines=13) @@
457
458
        $_success = $this->parse_();
459
460
        if ($_success) {
461
            $_value31[] = $this->value;
462
463
            if (substr($this->string, $this->position, strlen('<!--')) === '<!--') {
464
                $_success = true;
465
                $this->value = substr($this->string, $this->position, strlen('<!--'));
466
                $this->position += strlen('<!--');
467
            } else {
468
                $_success = false;
469
470
                $this->report($this->position, '\'<!--\'');
471
            }
472
        }
473
474
        if ($_success) {
475
            $_value31[] = $this->value;
@@ 553-565 (lines=13) @@
550
551
        $_success = $this->parse_();
552
553
        if ($_success) {
554
            $_value34[] = $this->value;
555
556
            if (substr($this->string, $this->position, strlen('-->')) === '-->') {
557
                $_success = true;
558
                $this->value = substr($this->string, $this->position, strlen('-->'));
559
                $this->position += strlen('-->');
560
            } else {
561
                $_success = false;
562
563
                $this->report($this->position, '\'-->\'');
564
            }
565
        }
566
567
        if ($_success) {
568
            $_value34[] = $this->value;
@@ 620-632 (lines=13) @@
617
618
        $_success = $this->parse_();
619
620
        if ($_success) {
621
            $_value40[] = $this->value;
622
623
            if (substr($this->string, $this->position, strlen('@')) === '@') {
624
                $_success = true;
625
                $this->value = substr($this->string, $this->position, strlen('@'));
626
                $this->position += strlen('@');
627
            } else {
628
                $_success = false;
629
630
                $this->report($this->position, '\'@\'');
631
            }
632
        }
633
634
        if ($_success) {
635
            $_value40[] = $this->value;
@@ 875-887 (lines=13) @@
872
                $this->cut = false;
873
                $_success = $this->parseESCAPED_QUOTE();
874
875
                if (!$_success && !$this->cut) {
876
                    $this->position = $_position44;
877
878
                    if (substr($this->string, $this->position, strlen(' ')) === ' ') {
879
                        $_success = true;
880
                        $this->value = substr($this->string, $this->position, strlen(' '));
881
                        $this->position += strlen(' ');
882
                    } else {
883
                        $_success = false;
884
885
                        $this->report($this->position, '\' \'');
886
                    }
887
                }
888
889
                if (!$_success && !$this->cut) {
890
                    $this->position = $_position44;
@@ 917-929 (lines=13) @@
914
            }
915
        }
916
917
        if ($_success) {
918
            $_value49[] = $this->value;
919
920
            if (substr($this->string, $this->position, strlen('"')) === '"') {
921
                $_success = true;
922
                $this->value = substr($this->string, $this->position, strlen('"'));
923
                $this->position += strlen('"');
924
            } else {
925
                $_success = false;
926
927
                $this->report($this->position, '\'"\'');
928
            }
929
        }
930
931
        if ($_success) {
932
            $_value49[] = $this->value;
@@ 1031-1043 (lines=13) @@
1028
            $this->report($this->position, '\' \'');
1029
        }
1030
1031
        if (!$_success && !$this->cut) {
1032
            $this->position = $_position50;
1033
1034
            if (substr($this->string, $this->position, strlen("\r")) === "\r") {
1035
                $_success = true;
1036
                $this->value = substr($this->string, $this->position, strlen("\r"));
1037
                $this->position += strlen("\r");
1038
            } else {
1039
                $_success = false;
1040
1041
                $this->report($this->position, '"\\r"');
1042
            }
1043
        }
1044
1045
        if (!$_success && !$this->cut) {
1046
            $this->position = $_position50;
@@ 1045-1057 (lines=13) @@
1042
            }
1043
        }
1044
1045
        if (!$_success && !$this->cut) {
1046
            $this->position = $_position50;
1047
1048
            if (substr($this->string, $this->position, strlen("\n")) === "\n") {
1049
                $_success = true;
1050
                $this->value = substr($this->string, $this->position, strlen("\n"));
1051
                $this->position += strlen("\n");
1052
            } else {
1053
                $_success = false;
1054
1055
                $this->report($this->position, '"\\n"');
1056
            }
1057
        }
1058
1059
        if (!$_success && !$this->cut) {
1060
            $this->position = $_position50;
@@ 1059-1071 (lines=13) @@
1056
            }
1057
        }
1058
1059
        if (!$_success && !$this->cut) {
1060
            $this->position = $_position50;
1061
1062
            if (substr($this->string, $this->position, strlen("\t")) === "\t") {
1063
                $_success = true;
1064
                $this->value = substr($this->string, $this->position, strlen("\t"));
1065
                $this->position += strlen("\t");
1066
            } else {
1067
                $_success = false;
1068
1069
                $this->report($this->position, '"\\t"');
1070
            }
1071
        }
1072
1073
        if (!$_success && !$this->cut) {
1074
            $this->position = $_position50;
@@ 1073-1085 (lines=13) @@
1070
            }
1071
        }
1072
1073
        if (!$_success && !$this->cut) {
1074
            $this->position = $_position50;
1075
1076
            if (substr($this->string, $this->position, strlen('-->')) === '-->') {
1077
                $_success = true;
1078
                $this->value = substr($this->string, $this->position, strlen('-->'));
1079
                $this->position += strlen('-->');
1080
            } else {
1081
                $_success = false;
1082
1083
                $this->report($this->position, '\'-->\'');
1084
            }
1085
        }
1086
1087
        if (!$_success && !$this->cut) {
1088
            $this->position = $_position50;
@@ 1087-1099 (lines=13) @@
1084
            }
1085
        }
1086
1087
        if (!$_success && !$this->cut) {
1088
            $this->position = $_position50;
1089
1090
            if (substr($this->string, $this->position, strlen('"')) === '"') {
1091
                $_success = true;
1092
                $this->value = substr($this->string, $this->position, strlen('"'));
1093
                $this->position += strlen('"');
1094
            } else {
1095
                $_success = false;
1096
1097
                $this->report($this->position, '\'"\'');
1098
            }
1099
        }
1100
1101
        $this->cut = $_cut51;
1102
@@ 1159-1171 (lines=13) @@
1156
                    $this->report($this->position, '\' \'');
1157
                }
1158
1159
                if (!$_success && !$this->cut) {
1160
                    $this->position = $_position50;
1161
1162
                    if (substr($this->string, $this->position, strlen("\r")) === "\r") {
1163
                        $_success = true;
1164
                        $this->value = substr($this->string, $this->position, strlen("\r"));
1165
                        $this->position += strlen("\r");
1166
                    } else {
1167
                        $_success = false;
1168
1169
                        $this->report($this->position, '"\\r"');
1170
                    }
1171
                }
1172
1173
                if (!$_success && !$this->cut) {
1174
                    $this->position = $_position50;
@@ 1173-1185 (lines=13) @@
1170
                    }
1171
                }
1172
1173
                if (!$_success && !$this->cut) {
1174
                    $this->position = $_position50;
1175
1176
                    if (substr($this->string, $this->position, strlen("\n")) === "\n") {
1177
                        $_success = true;
1178
                        $this->value = substr($this->string, $this->position, strlen("\n"));
1179
                        $this->position += strlen("\n");
1180
                    } else {
1181
                        $_success = false;
1182
1183
                        $this->report($this->position, '"\\n"');
1184
                    }
1185
                }
1186
1187
                if (!$_success && !$this->cut) {
1188
                    $this->position = $_position50;
@@ 1187-1199 (lines=13) @@
1184
                    }
1185
                }
1186
1187
                if (!$_success && !$this->cut) {
1188
                    $this->position = $_position50;
1189
1190
                    if (substr($this->string, $this->position, strlen("\t")) === "\t") {
1191
                        $_success = true;
1192
                        $this->value = substr($this->string, $this->position, strlen("\t"));
1193
                        $this->position += strlen("\t");
1194
                    } else {
1195
                        $_success = false;
1196
1197
                        $this->report($this->position, '"\\t"');
1198
                    }
1199
                }
1200
1201
                if (!$_success && !$this->cut) {
1202
                    $this->position = $_position50;
@@ 1201-1213 (lines=13) @@
1198
                    }
1199
                }
1200
1201
                if (!$_success && !$this->cut) {
1202
                    $this->position = $_position50;
1203
1204
                    if (substr($this->string, $this->position, strlen('-->')) === '-->') {
1205
                        $_success = true;
1206
                        $this->value = substr($this->string, $this->position, strlen('-->'));
1207
                        $this->position += strlen('-->');
1208
                    } else {
1209
                        $_success = false;
1210
1211
                        $this->report($this->position, '\'-->\'');
1212
                    }
1213
                }
1214
1215
                if (!$_success && !$this->cut) {
1216
                    $this->position = $_position50;
@@ 1215-1227 (lines=13) @@
1212
                    }
1213
                }
1214
1215
                if (!$_success && !$this->cut) {
1216
                    $this->position = $_position50;
1217
1218
                    if (substr($this->string, $this->position, strlen('"')) === '"') {
1219
                        $_success = true;
1220
                        $this->value = substr($this->string, $this->position, strlen('"'));
1221
                        $this->position += strlen('"');
1222
                    } else {
1223
                        $_success = false;
1224
1225
                        $this->report($this->position, '\'"\'');
1226
                    }
1227
                }
1228
1229
                $this->cut = $_cut51;
1230
@@ 1563-1575 (lines=13) @@
1560
            $this->cut = $_cut72;
1561
        }
1562
1563
        if ($_success) {
1564
            $_value73[] = $this->value;
1565
1566
            if (substr($this->string, $this->position, strlen("\n")) === "\n") {
1567
                $_success = true;
1568
                $this->value = substr($this->string, $this->position, strlen("\n"));
1569
                $this->position += strlen("\n");
1570
            } else {
1571
                $_success = false;
1572
1573
                $this->report($this->position, '"\\n"');
1574
            }
1575
        }
1576
1577
        if ($_success) {
1578
            $_value73[] = $this->value;
@@ 1676-1688 (lines=13) @@
1673
                $this->report($this->position, '" "');
1674
            }
1675
1676
            if (!$_success && !$this->cut) {
1677
                $this->position = $_position76;
1678
1679
                if (substr($this->string, $this->position, strlen("\t")) === "\t") {
1680
                    $_success = true;
1681
                    $this->value = substr($this->string, $this->position, strlen("\t"));
1682
                    $this->position += strlen("\t");
1683
                } else {
1684
                    $_success = false;
1685
1686
                    $this->report($this->position, '"\\t"');
1687
                }
1688
            }
1689
1690
            $this->cut = $_cut77;
1691