Code Duplication    Length = 13-13 lines in 14 locations

src/Parser/Parser.php 14 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;
@@ 1098-1110 (lines=13) @@
1095
            $_success = $this->parseCOMMENT_END_COLD_FUSION();
1096
        }
1097
1098
        if (!$_success && !$this->cut) {
1099
            $this->position = $_position55;
1100
1101
            if (substr($this->string, $this->position, strlen('"')) === '"') {
1102
                $_success = true;
1103
                $this->value = substr($this->string, $this->position, strlen('"'));
1104
                $this->position += strlen('"');
1105
            } else {
1106
                $_success = false;
1107
1108
                $this->report($this->position, '\'"\'');
1109
            }
1110
        }
1111
1112
        $this->cut = $_cut56;
1113
@@ 1170-1182 (lines=13) @@
1167
                    $this->report($this->position, '\' \'');
1168
                }
1169
1170
                if (!$_success && !$this->cut) {
1171
                    $this->position = $_position55;
1172
1173
                    if (substr($this->string, $this->position, strlen("\r")) === "\r") {
1174
                        $_success = true;
1175
                        $this->value = substr($this->string, $this->position, strlen("\r"));
1176
                        $this->position += strlen("\r");
1177
                    } else {
1178
                        $_success = false;
1179
1180
                        $this->report($this->position, '"\\r"');
1181
                    }
1182
                }
1183
1184
                if (!$_success && !$this->cut) {
1185
                    $this->position = $_position55;
@@ 1184-1196 (lines=13) @@
1181
                    }
1182
                }
1183
1184
                if (!$_success && !$this->cut) {
1185
                    $this->position = $_position55;
1186
1187
                    if (substr($this->string, $this->position, strlen("\n")) === "\n") {
1188
                        $_success = true;
1189
                        $this->value = substr($this->string, $this->position, strlen("\n"));
1190
                        $this->position += strlen("\n");
1191
                    } else {
1192
                        $_success = false;
1193
1194
                        $this->report($this->position, '"\\n"');
1195
                    }
1196
                }
1197
1198
                if (!$_success && !$this->cut) {
1199
                    $this->position = $_position55;
@@ 1198-1210 (lines=13) @@
1195
                    }
1196
                }
1197
1198
                if (!$_success && !$this->cut) {
1199
                    $this->position = $_position55;
1200
1201
                    if (substr($this->string, $this->position, strlen("\t")) === "\t") {
1202
                        $_success = true;
1203
                        $this->value = substr($this->string, $this->position, strlen("\t"));
1204
                        $this->position += strlen("\t");
1205
                    } else {
1206
                        $_success = false;
1207
1208
                        $this->report($this->position, '"\\t"');
1209
                    }
1210
                }
1211
1212
                if (!$_success && !$this->cut) {
1213
                    $this->position = $_position55;
@@ 1224-1236 (lines=13) @@
1221
                    $_success = $this->parseCOMMENT_END_COLD_FUSION();
1222
                }
1223
1224
                if (!$_success && !$this->cut) {
1225
                    $this->position = $_position55;
1226
1227
                    if (substr($this->string, $this->position, strlen('"')) === '"') {
1228
                        $_success = true;
1229
                        $this->value = substr($this->string, $this->position, strlen('"'));
1230
                        $this->position += strlen('"');
1231
                    } else {
1232
                        $_success = false;
1233
1234
                        $this->report($this->position, '\'"\'');
1235
                    }
1236
                }
1237
1238
                $this->cut = $_cut56;
1239
@@ 1757-1769 (lines=13) @@
1754
1755
        $_success = $this->parse_();
1756
1757
        if ($_success) {
1758
            $_value91[] = $this->value;
1759
1760
            if (substr($this->string, $this->position, strlen('<!--')) === '<!--') {
1761
                $_success = true;
1762
                $this->value = substr($this->string, $this->position, strlen('<!--'));
1763
                $this->position += strlen('<!--');
1764
            } else {
1765
                $_success = false;
1766
1767
                $this->report($this->position, '\'<!--\'');
1768
            }
1769
        }
1770
1771
        if ($_success) {
1772
            $_value91[] = $this->value;
@@ 2017-2029 (lines=13) @@
2014
            $this->cut = $_cut98;
2015
        }
2016
2017
        if ($_success) {
2018
            $_value99[] = $this->value;
2019
2020
            if (substr($this->string, $this->position, strlen("\n")) === "\n") {
2021
                $_success = true;
2022
                $this->value = substr($this->string, $this->position, strlen("\n"));
2023
                $this->position += strlen("\n");
2024
            } else {
2025
                $_success = false;
2026
2027
                $this->report($this->position, '"\\n"');
2028
            }
2029
        }
2030
2031
        if ($_success) {
2032
            $_value99[] = $this->value;
@@ 2130-2142 (lines=13) @@
2127
                $this->report($this->position, '" "');
2128
            }
2129
2130
            if (!$_success && !$this->cut) {
2131
                $this->position = $_position102;
2132
2133
                if (substr($this->string, $this->position, strlen("\t")) === "\t") {
2134
                    $_success = true;
2135
                    $this->value = substr($this->string, $this->position, strlen("\t"));
2136
                    $this->position += strlen("\t");
2137
                } else {
2138
                    $_success = false;
2139
2140
                    $this->report($this->position, '"\\t"');
2141
                }
2142
            }
2143
2144
            $this->cut = $_cut103;
2145