Code Duplication    Length = 13-13 lines in 17 locations

src/Parser/Parser.php 17 locations

@@ 633-645 (lines=13) @@
630
631
        $_success = $this->parse_();
632
633
        if ($_success) {
634
            $_value45[] = $this->value;
635
636
            if (substr($this->string, $this->position, strlen('@')) === '@') {
637
                $_success = true;
638
                $this->value = substr($this->string, $this->position, strlen('@'));
639
                $this->position += strlen('@');
640
            } else {
641
                $_success = false;
642
643
                $this->report($this->position, '\'@\'');
644
            }
645
        }
646
647
        if ($_success) {
648
            $_value45[] = $this->value;
@@ 888-900 (lines=13) @@
885
                $this->cut = false;
886
                $_success = $this->parseESCAPED_QUOTE();
887
888
                if (!$_success && !$this->cut) {
889
                    $this->position = $_position49;
890
891
                    if (substr($this->string, $this->position, strlen(' ')) === ' ') {
892
                        $_success = true;
893
                        $this->value = substr($this->string, $this->position, strlen(' '));
894
                        $this->position += strlen(' ');
895
                    } else {
896
                        $_success = false;
897
898
                        $this->report($this->position, '\' \'');
899
                    }
900
                }
901
902
                if (!$_success && !$this->cut) {
903
                    $this->position = $_position49;
@@ 930-942 (lines=13) @@
927
            }
928
        }
929
930
        if ($_success) {
931
            $_value54[] = $this->value;
932
933
            if (substr($this->string, $this->position, strlen('"')) === '"') {
934
                $_success = true;
935
                $this->value = substr($this->string, $this->position, strlen('"'));
936
                $this->position += strlen('"');
937
            } else {
938
                $_success = false;
939
940
                $this->report($this->position, '\'"\'');
941
            }
942
        }
943
944
        if ($_success) {
945
            $_value54[] = $this->value;
@@ 1044-1056 (lines=13) @@
1041
            $this->report($this->position, '\' \'');
1042
        }
1043
1044
        if (!$_success && !$this->cut) {
1045
            $this->position = $_position55;
1046
1047
            if (substr($this->string, $this->position, strlen("\r")) === "\r") {
1048
                $_success = true;
1049
                $this->value = substr($this->string, $this->position, strlen("\r"));
1050
                $this->position += strlen("\r");
1051
            } else {
1052
                $_success = false;
1053
1054
                $this->report($this->position, '"\\r"');
1055
            }
1056
        }
1057
1058
        if (!$_success && !$this->cut) {
1059
            $this->position = $_position55;
@@ 1058-1070 (lines=13) @@
1055
            }
1056
        }
1057
1058
        if (!$_success && !$this->cut) {
1059
            $this->position = $_position55;
1060
1061
            if (substr($this->string, $this->position, strlen("\n")) === "\n") {
1062
                $_success = true;
1063
                $this->value = substr($this->string, $this->position, strlen("\n"));
1064
                $this->position += strlen("\n");
1065
            } else {
1066
                $_success = false;
1067
1068
                $this->report($this->position, '"\\n"');
1069
            }
1070
        }
1071
1072
        if (!$_success && !$this->cut) {
1073
            $this->position = $_position55;
@@ 1072-1084 (lines=13) @@
1069
            }
1070
        }
1071
1072
        if (!$_success && !$this->cut) {
1073
            $this->position = $_position55;
1074
1075
            if (substr($this->string, $this->position, strlen("\t")) === "\t") {
1076
                $_success = true;
1077
                $this->value = substr($this->string, $this->position, strlen("\t"));
1078
                $this->position += strlen("\t");
1079
            } else {
1080
                $_success = false;
1081
1082
                $this->report($this->position, '"\\t"');
1083
            }
1084
        }
1085
1086
        if (!$_success && !$this->cut) {
1087
            $this->position = $_position55;
@@ 1086-1098 (lines=13) @@
1083
            }
1084
        }
1085
1086
        if (!$_success && !$this->cut) {
1087
            $this->position = $_position55;
1088
1089
            if (substr($this->string, $this->position, strlen('-->')) === '-->') {
1090
                $_success = true;
1091
                $this->value = substr($this->string, $this->position, strlen('-->'));
1092
                $this->position += strlen('-->');
1093
            } else {
1094
                $_success = false;
1095
1096
                $this->report($this->position, '\'-->\'');
1097
            }
1098
        }
1099
1100
        if (!$_success && !$this->cut) {
1101
            $this->position = $_position55;
@@ 1100-1112 (lines=13) @@
1097
            }
1098
        }
1099
1100
        if (!$_success && !$this->cut) {
1101
            $this->position = $_position55;
1102
1103
            if (substr($this->string, $this->position, strlen('"')) === '"') {
1104
                $_success = true;
1105
                $this->value = substr($this->string, $this->position, strlen('"'));
1106
                $this->position += strlen('"');
1107
            } else {
1108
                $_success = false;
1109
1110
                $this->report($this->position, '\'"\'');
1111
            }
1112
        }
1113
1114
        $this->cut = $_cut56;
1115
@@ 1172-1184 (lines=13) @@
1169
                    $this->report($this->position, '\' \'');
1170
                }
1171
1172
                if (!$_success && !$this->cut) {
1173
                    $this->position = $_position55;
1174
1175
                    if (substr($this->string, $this->position, strlen("\r")) === "\r") {
1176
                        $_success = true;
1177
                        $this->value = substr($this->string, $this->position, strlen("\r"));
1178
                        $this->position += strlen("\r");
1179
                    } else {
1180
                        $_success = false;
1181
1182
                        $this->report($this->position, '"\\r"');
1183
                    }
1184
                }
1185
1186
                if (!$_success && !$this->cut) {
1187
                    $this->position = $_position55;
@@ 1186-1198 (lines=13) @@
1183
                    }
1184
                }
1185
1186
                if (!$_success && !$this->cut) {
1187
                    $this->position = $_position55;
1188
1189
                    if (substr($this->string, $this->position, strlen("\n")) === "\n") {
1190
                        $_success = true;
1191
                        $this->value = substr($this->string, $this->position, strlen("\n"));
1192
                        $this->position += strlen("\n");
1193
                    } else {
1194
                        $_success = false;
1195
1196
                        $this->report($this->position, '"\\n"');
1197
                    }
1198
                }
1199
1200
                if (!$_success && !$this->cut) {
1201
                    $this->position = $_position55;
@@ 1200-1212 (lines=13) @@
1197
                    }
1198
                }
1199
1200
                if (!$_success && !$this->cut) {
1201
                    $this->position = $_position55;
1202
1203
                    if (substr($this->string, $this->position, strlen("\t")) === "\t") {
1204
                        $_success = true;
1205
                        $this->value = substr($this->string, $this->position, strlen("\t"));
1206
                        $this->position += strlen("\t");
1207
                    } else {
1208
                        $_success = false;
1209
1210
                        $this->report($this->position, '"\\t"');
1211
                    }
1212
                }
1213
1214
                if (!$_success && !$this->cut) {
1215
                    $this->position = $_position55;
@@ 1214-1226 (lines=13) @@
1211
                    }
1212
                }
1213
1214
                if (!$_success && !$this->cut) {
1215
                    $this->position = $_position55;
1216
1217
                    if (substr($this->string, $this->position, strlen('-->')) === '-->') {
1218
                        $_success = true;
1219
                        $this->value = substr($this->string, $this->position, strlen('-->'));
1220
                        $this->position += strlen('-->');
1221
                    } else {
1222
                        $_success = false;
1223
1224
                        $this->report($this->position, '\'-->\'');
1225
                    }
1226
                }
1227
1228
                if (!$_success && !$this->cut) {
1229
                    $this->position = $_position55;
@@ 1228-1240 (lines=13) @@
1225
                    }
1226
                }
1227
1228
                if (!$_success && !$this->cut) {
1229
                    $this->position = $_position55;
1230
1231
                    if (substr($this->string, $this->position, strlen('"')) === '"') {
1232
                        $_success = true;
1233
                        $this->value = substr($this->string, $this->position, strlen('"'));
1234
                        $this->position += strlen('"');
1235
                    } else {
1236
                        $_success = false;
1237
1238
                        $this->report($this->position, '\'"\'');
1239
                    }
1240
                }
1241
1242
                $this->cut = $_cut56;
1243
@@ 1761-1773 (lines=13) @@
1758
1759
        $_success = $this->parse_();
1760
1761
        if ($_success) {
1762
            $_value91[] = $this->value;
1763
1764
            if (substr($this->string, $this->position, strlen('<!--')) === '<!--') {
1765
                $_success = true;
1766
                $this->value = substr($this->string, $this->position, strlen('<!--'));
1767
                $this->position += strlen('<!--');
1768
            } else {
1769
                $_success = false;
1770
1771
                $this->report($this->position, '\'<!--\'');
1772
            }
1773
        }
1774
1775
        if ($_success) {
1776
            $_value91[] = $this->value;
@@ 1854-1866 (lines=13) @@
1851
1852
        $_success = $this->parse_();
1853
1854
        if ($_success) {
1855
            $_value94[] = $this->value;
1856
1857
            if (substr($this->string, $this->position, strlen('-->')) === '-->') {
1858
                $_success = true;
1859
                $this->value = substr($this->string, $this->position, strlen('-->'));
1860
                $this->position += strlen('-->');
1861
            } else {
1862
                $_success = false;
1863
1864
                $this->report($this->position, '\'-->\'');
1865
            }
1866
        }
1867
1868
        if ($_success) {
1869
            $_value94[] = $this->value;
@@ 1947-1959 (lines=13) @@
1944
            $this->cut = $_cut96;
1945
        }
1946
1947
        if ($_success) {
1948
            $_value97[] = $this->value;
1949
1950
            if (substr($this->string, $this->position, strlen("\n")) === "\n") {
1951
                $_success = true;
1952
                $this->value = substr($this->string, $this->position, strlen("\n"));
1953
                $this->position += strlen("\n");
1954
            } else {
1955
                $_success = false;
1956
1957
                $this->report($this->position, '"\\n"');
1958
            }
1959
        }
1960
1961
        if ($_success) {
1962
            $_value97[] = $this->value;
@@ 2060-2072 (lines=13) @@
2057
                $this->report($this->position, '" "');
2058
            }
2059
2060
            if (!$_success && !$this->cut) {
2061
                $this->position = $_position100;
2062
2063
                if (substr($this->string, $this->position, strlen("\t")) === "\t") {
2064
                    $_success = true;
2065
                    $this->value = substr($this->string, $this->position, strlen("\t"));
2066
                    $this->position += strlen("\t");
2067
                } else {
2068
                    $_success = false;
2069
2070
                    $this->report($this->position, '"\\t"');
2071
                }
2072
            }
2073
2074
            $this->cut = $_cut101;
2075