Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 46-52 (lines=7) @@
43
	}
44
45
46
	public function fieldAsProgress($index,$label=NULL, $attributes=array()){
47
		$this->setValueFunction($index,function($value) use($label,$attributes){
48
			$pb=new HtmlProgress($this->_getFieldIdentifier("pb"),$value,$label,$attributes);
49
			return $pb;
50
		});
51
			return $this;
52
	}
53
54
	public function fieldAsRating($index,$max=5, $icon=""){
55
		$this->setValueFunction($index,function($value) use($max,$icon){
@@ 54-60 (lines=7) @@
51
			return $this;
52
	}
53
54
	public function fieldAsRating($index,$max=5, $icon=""){
55
		$this->setValueFunction($index,function($value) use($max,$icon){
56
			$rating=new HtmlRating($this->_getFieldIdentifier("rat"),$value,$max,$icon);
57
			return $rating;
58
		});
59
			return $this;
60
	}
61
62
	public function fieldAsLabel($index,$icon=NULL){
63
		$this->setValueFunction($index,function($caption) use($icon){