Code Duplication    Length = 3-3 lines in 2 locations

framework/Web/UI/TTemplate.php 2 locations

@@ 757-759 (lines=3) @@
754
				if ($token[2] === '#') {
755
					$isDataBind = true;
756
				}
757
				if ($offset > $textStart) {
758
					$expr .= ".'" . strtr(substr($value, $textStart, $offset - $textStart), ["'" => "\\'", "\\" => "\\\\"]) . "'";
759
				}
760
				$expr .= '.(' . substr($token, 3, $length - 5) . ')';
761
				$textStart = $offset + $length;
762
			}
@@ 764-766 (lines=3) @@
761
				$textStart = $offset + $length;
762
			}
763
			$length = strlen($value);
764
			if ($length > $textStart) {
765
				$expr .= ".'" . strtr(substr($value, $textStart, $length - $textStart), ["'" => "\\'", "\\" => "\\\\"]) . "'";
766
			}
767
			if ($isDataBind) {
768
				return [self::CONFIG_DATABIND, ltrim($expr, '.')];
769
			} else {