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

@@ 276-282 (lines=7) @@
273
	 * @param callable $callback function($element)
274
	 * @return \Ajax\common\html\HtmlDoubleElement
275
	 */
276
	public function addDropdownInToolbar($value,$items,$callback=NULL){
277
		$dd=$value;
278
		if (\is_string($value)) {
279
			$dd=new HtmlDropdown("dropdown-". $this->identifier."-".$value, $value, $items);
280
		}
281
		return $this->addInToolbar($dd,$callback);
282
	}
283
284
	/**
285
	 * @param string $caption