Code Duplication    Length = 7-7 lines in 2 locations

Ajax/semantic/widgets/base/FieldAsTrait.php 2 locations

@@ 103-109 (lines=7) @@
100
	}
101
102
103
	public function fieldAsProgress($index,$label=NULL, $attributes=array()){
104
		$this->setValueFunction($index,function($value) use($label,$attributes){
105
			$pb=new HtmlProgress($this->_getFieldIdentifier("pb"),$value,$label,$attributes);
106
			return $pb;
107
		});
108
			return $this;
109
	}
110
111
	public function fieldAsRating($index,$max=5, $icon=""){
112
		$this->setValueFunction($index,function($value) use($max,$icon){
@@ 111-117 (lines=7) @@
108
			return $this;
109
	}
110
111
	public function fieldAsRating($index,$max=5, $icon=""){
112
		$this->setValueFunction($index,function($value) use($max,$icon){
113
			$rating=new HtmlRating($this->_getFieldIdentifier("rat"),$value,$max,$icon);
114
			return $rating;
115
		});
116
			return $this;
117
	}
118
119
	public function fieldAsLabel($index,$icon=NULL,$attributes=NULL){
120
		return $this->_fieldAs(function($id,$name,$value) use($icon){