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

@@ 220-224 (lines=5) @@
217
	 */
218
	public function addInToolbar($element,$callback=NULL){
219
		$tb=$this->getToolbar();
220
		if($element instanceof BaseWidget){
221
			if($element->getIdentifier()===""){
222
				$element->setIdentifier("tb-item-".$this->identifier."-".$tb->count());
223
			}
224
		}
225
		if(isset($callback)){
226
			if(\is_callable($callback)){
227
				$callback($element);