Code Duplication    Length = 3-3 lines in 8 locations

framework/Web/UI/TTemplate.php 8 locations

@@ 488-490 (lines=3) @@
485
					if ($expectPropEnd) {
486
						continue;
487
					}
488
					if ($matchStart > $textStart) {
489
						$tpl[$c++] = [$container, substr($input, $textStart, $matchStart - $textStart)];
490
					}
491
					$textStart = $matchEnd + 1;
492
					$type = $match[1][0];
493
					$attributes = $this->parseAttributes($match[2][0], $match[2][1]);
@@ 504-506 (lines=3) @@
501
					if ($expectPropEnd) {
502
						continue;
503
					}
504
					if ($matchStart > $textStart) {
505
						$tpl[$c++] = [$container, substr($input, $textStart, $matchStart - $textStart)];
506
					}
507
					$textStart = $matchEnd + 1;
508
					$type = $match[1][0];
509
@@ 524-526 (lines=3) @@
521
					if ($expectPropEnd) {
522
						continue;
523
					}
524
					if ($matchStart > $textStart) {
525
						$tpl[$c++] = [$container, substr($input, $textStart, $matchStart - $textStart)];
526
					}
527
					$textStart = $matchEnd + 1;
528
					if (isset($tpl[0]) || $this->_directive !== null) {
529
						throw new TConfigurationException('template_directive_nonunique');
@@ 536-538 (lines=3) @@
533
					if ($expectPropEnd) {
534
						continue;
535
					}
536
					if ($matchStart > $textStart) {
537
						$tpl[$c++] = [$container, substr($input, $textStart, $matchStart - $textStart)];
538
					}
539
					$textStart = $matchEnd + 1;
540
					$literal = trim($match[5][0]);
541
					if ($str[2] === '=') {	// expression
@@ 562-564 (lines=3) @@
559
						if ($expectPropEnd) {
560
							continue;
561
						}
562
						if ($matchStart > $textStart) {
563
							$tpl[$c++] = [$container, substr($input, $textStart, $matchStart - $textStart)];
564
						}
565
						$textStart = $matchEnd + 1;
566
						$prop = strtolower($match[6][0]);
567
						$attrs = $this->parseAttributes($match[7][0], $match[7][1]);
@@ 584-586 (lines=3) @@
581
						$prop = strtolower($match[3][0]);
582
						$stack[] = '@' . $prop;
583
						if (!$expectPropEnd) {
584
							if ($matchStart > $textStart) {
585
								$tpl[$c++] = [$container, substr($input, $textStart, $matchStart - $textStart)];
586
							}
587
							$textStart = $matchEnd + 1;
588
							$expectPropEnd = true;
589
						}
@@ 627-629 (lines=3) @@
624
					if ($expectPropEnd) {
625
						throw new TConfigurationException('template_comments_forbidden');
626
					}
627
					if ($matchStart > $textStart) {
628
						$tpl[$c++] = [$container, substr($input, $textStart, $matchStart - $textStart)];
629
					}
630
					$textStart = $matchEnd + 1;
631
				} else {
632
					throw new TConfigurationException('template_matching_unexpected', $match);
@@ 640-642 (lines=3) @@
637
				$tag = $name[0] === '@' ? '</prop:' . substr($name, 1) . '>' : "</com:$name>";
638
				throw new TConfigurationException('template_closingtag_expected', $tag, "nothing");
639
			}
640
			if ($textStart < strlen($input)) {
641
				$tpl[$c++] = [$container, substr($input, $textStart)];
642
			}
643
		} catch (\Exception $e) {
644
			if (($e instanceof TException) && ($e instanceof TTemplateException)) {
645
				throw $e;