Code Duplication    Length = 9-9 lines in 2 locations

includes/parser/Preprocessor_DOM.php 1 location

@@ 371-379 (lines=9) @@
368
						// Keep looking forward as long as we're finding more
369
						// comments.
370
						$comments = [ [ $wsStart, $wsEnd ] ];
371
						while ( substr( $text, $wsEnd + 1, 4 ) == '<!--' ) {
372
							$c = strpos( $text, '-->', $wsEnd + 4 );
373
							if ( $c === false ) {
374
								break;
375
							}
376
							$c = $c + 2 + strspn( $text, " \t", $c + 3 );
377
							$comments[] = [ $wsEnd + 1, $c ];
378
							$wsEnd = $c;
379
						}
380
381
						// Eat the line if possible
382
						// TODO: This could theoretically be done if $wsStart == 0, i.e. for comments at

includes/parser/Preprocessor_Hash.php 1 location

@@ 302-310 (lines=9) @@
299
						// Keep looking forward as long as we're finding more
300
						// comments.
301
						$comments = [ [ $wsStart, $wsEnd ] ];
302
						while ( substr( $text, $wsEnd + 1, 4 ) == '<!--' ) {
303
							$c = strpos( $text, '-->', $wsEnd + 4 );
304
							if ( $c === false ) {
305
								break;
306
							}
307
							$c = $c + 2 + strspn( $text, " \t", $c + 3 );
308
							$comments[] = [ $wsEnd + 1, $c ];
309
							$wsEnd = $c;
310
						}
311
312
						// Eat the line if possible
313
						// TODO: This could theoretically be done if $wsStart == 0, i.e. for comments at