Code Duplication    Length = 7-8 lines in 2 locations

Ajax/semantic/html/collections/menus/HtmlMenu.php 1 location

@@ 127-134 (lines=8) @@
124
		return $popup;
125
	}
126
127
	public function addDropdownAsItem($value, $items=NULL) {
128
		$dd=$value;
129
		if (\is_string($value)) {
130
			$dd=new HtmlDropdown("dropdown-" . $this->identifier . "-" . $this->count(), $value, $items);
131
		}
132
		$this->addItem($dd);
133
		return $dd;
134
	}
135
136
	/**
137
	 *

Ajax/common/Widget.php 1 location

@@ 235-241 (lines=7) @@
232
	 * @param callable $callback function($element)
233
	 * @return \Ajax\common\html\HtmlDoubleElement
234
	 */
235
	public function addDropdownInToolbar($value,$items,$callback=NULL){
236
		$dd=$value;
237
		if (\is_string($value)) {
238
			$dd=new HtmlDropdown("dropdown-". $this->identifier."-".$value, $value, $items);
239
		}
240
		return $this->addInToolbar($dd,$callback);
241
	}
242
243
	/**
244
	 * @param string $caption