Code Duplication    Length = 7-7 lines in 2 locations

lib/ar/html.php 1 location

@@ 263-269 (lines=7) @@
260
		public function toString( $indent = '', $current = 0 ) {
261
			$indent = ar_html::$indenting ? $indent : '';
262
			$result = "\n" . $indent . '<' . ar_html::name( $this->tagName );
263
			if ( is_array($this->attributes) ) {
264
				foreach ( $this->attributes as $name => $value ) {
265
					$result .= ar_html::attribute($name, $value, $current);
266
				}
267
			} else if ( is_string($this->attributes) ) {
268
				$result .= ltrim(' '.$this->attributes);
269
			}
270
			if ( !ar_html::$xhtml || ar_html::canHaveContent( $this->tagName ) ) {
271
				$result .= '>';
272
				if ( ar_html::canHaveContent( $this->tagName ) ) {

lib/ar/xml.php 1 location

@@ 1072-1078 (lines=7) @@
1069
		function toString( $indent = '', $current = 0 ) {
1070
			$indent = ar_xml::$indenting ? $indent : '';
1071
			$result = "\n" . $indent . '<' . ar_xml::name( $this->tagName );
1072
			if ( is_array($this->attributes) ) {
1073
				foreach ( $this->attributes as $name => $value ) {
1074
					$result .= ar_xml::attribute($name, $value, $current);
1075
				}
1076
			} else if ( is_string($this->attributes) ) {
1077
				$result .= ltrim(' '.$this->attributes);
1078
			}
1079
			if ( $this->childNodes instanceof ar_xmlNodes && count($this->childNodes) ) {
1080
				$result .= '>';
1081
				$result .= $this->childNodes->toString( ar_xml::$indent . $indent );