Code Duplication    Length = 7-7 lines in 2 locations

Ajax/semantic/widgets/dataform/FormFieldAsTrait.php 1 location

@@ 105-111 (lines=7) @@
102
		}, $index,$attributes);
103
	}
104
105
	public function fieldAsDropDown($index,$elements=[],$multiple=false,$attributes=NULL){
106
		return $this->_fieldAs(function($id,$name,$value,$caption) use ($elements,$multiple){
107
			$dd=new HtmlFormDropdown($id,$elements,$caption,$value,$multiple);
108
			$dd->setName($name);
109
			return $dd;
110
		}, $index,$attributes);
111
	}
112
113
	public function fieldAsMessage($index,$attributes=NULL){
114
		return $this->_fieldAs(function($id,$name,$value,$caption){

Ajax/semantic/widgets/base/FieldAsTrait.php 1 location

@@ 129-135 (lines=7) @@
126
		}, $index,$attributes,"ck");
127
	}
128
129
	public function fieldAsDropDown($index,$elements=[],$multiple=false,$attributes=NULL){
130
		return $this->_fieldAs(function($id,$name,$value) use($elements,$multiple){
131
			$dd=new HtmlDropdown($id,$value,$elements);
132
			$dd->asSelect($name,$multiple);
133
			return $dd;
134
		}, $index,$attributes,"dd");
135
	}
136
}