Code Duplication    Length = 7-7 lines in 2 locations

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

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