Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 64-70 (lines=7) @@
61
	}
62
63
64
	public function fieldAsProgress($index,$label=NULL, $attributes=array()){
65
		$this->setValueFunction($index,function($value) use($label,$attributes){
66
			$pb=new HtmlProgress($this->_getFieldIdentifier("pb"),$value,$label,$attributes);
67
			return $pb;
68
		});
69
			return $this;
70
	}
71
72
	public function fieldAsRating($index,$max=5, $icon=""){
73
		$this->setValueFunction($index,function($value) use($max,$icon){
@@ 72-78 (lines=7) @@
69
			return $this;
70
	}
71
72
	public function fieldAsRating($index,$max=5, $icon=""){
73
		$this->setValueFunction($index,function($value) use($max,$icon){
74
			$rating=new HtmlRating($this->_getFieldIdentifier("rat"),$value,$max,$icon);
75
			return $rating;
76
		});
77
			return $this;
78
	}
79
80
	public function fieldAsLabel($index,$icon=NULL){
81
		$this->setValueFunction($index,function($caption) use($icon){