Code Duplication    Length = 5-5 lines in 2 locations

Ajax/common/html/HtmlCollection.php 1 location

@@ 53-57 (lines=5) @@
50
	}
51
52
	protected function setItemIdentifier($item,$classname,$index){
53
		if($item instanceof BaseWidget){
54
			if($item->getIdentifier()===""){
55
				$item->setIdentifier($classname."-".$this->identifier."-".$index);
56
			}
57
		}
58
	}
59
60
	/**

Ajax/common/Widget.php 1 location

@@ 185-189 (lines=5) @@
182
	 */
183
	public function addInToolbar($element,$callback=NULL){
184
		$tb=$this->getToolbar();
185
		if($element instanceof BaseWidget){
186
			if($element->getIdentifier()===""){
187
				$element->setIdentifier("tb-item-".$this->identifier."-".$tb->count());
188
			}
189
		}
190
		if(isset($callback)){
191
			if(\is_callable($callback)){
192
				$callback($element);