Code Duplication    Length = 7-7 lines in 2 locations

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

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