Code Duplication    Length = 7-8 lines in 5 locations

Ajax/semantic/html/content/HtmlGridRow.php 1 location

@@ 47-53 (lines=7) @@
44
	 * @param int $width
45
	 * @return \Ajax\semantic\html\content\HtmlGridRow
46
	 */
47
	public function setWidth($width){
48
		if(\is_int($width)){
49
			$width=Wide::getConstants()["W".$width];
50
		}
51
		$this->addToPropertyCtrl("class", $width, Wide::getConstants());
52
		return $this->addToPropertyCtrl("class", "column",array("column"));
53
	}
54
55
	/**
56
	 * return the col at $index

Ajax/semantic/html/collections/HtmlGrid.php 1 location

@@ 51-58 (lines=8) @@
48
	 * Defines the grid width (alias for setWidth)
49
	 * @param int $wide
50
	 */
51
	public function setWide($wide) {
52
		if(isset(Wide::getConstants()["W" . $wide])){
53
			$wide=Wide::getConstants()["W" . $wide];
54
			$this->addToPropertyCtrl("class", $wide, Wide::getConstants());
55
			return $this->addToPropertyCtrl("class", "column", array ("column" ));
56
		}
57
		return $this;
58
	}
59
60
	/**
61
	 * Defines the grid width

Ajax/semantic/html/content/HtmlGridCol.php 1 location

@@ 31-37 (lines=7) @@
28
	 * @param int $width
29
	 * @return \Ajax\semantic\html\content\HtmlGridCol
30
	 */
31
	public function setWidth($width) {
32
		if (\is_int($width)) {
33
			$width=Wide::getConstants()["W" . $width];
34
		}
35
		$this->addToPropertyCtrl("class", $width, Wide::getConstants());
36
		return $this->addToPropertyCtrl("class", "wide", array ("wide" ));
37
	}
38
39
	public function setValue($value) {
40
		$this->content=$value;

Ajax/semantic/html/collections/menus/HtmlMenu.php 1 location

@@ 214-220 (lines=7) @@
211
	 * @param int $width
212
	 * @return \Ajax\semantic\html\collections\menus\HtmlMenu
213
	 */
214
	public function setWidth($width) {
215
		if (\is_int($width)) {
216
			$width=Wide::getConstants()["W" . $width];
217
		}
218
		$this->addToPropertyCtrl("class", $width, Wide::getConstants());
219
		return $this->addToPropertyCtrl("class", "item", array ("item" ));
220
	}
221
222
	public function addImage($identifier, $src="", $alt="") {
223
		return $this->addItem(new HtmlImg($identifier, $src, $alt));

Ajax/semantic/html/content/table/HtmlTD.php 1 location

@@ 118-124 (lines=7) @@
115
		return $this->addToProperty("class", "selectable");
116
	}
117
118
	public function setWidth($width){
119
		if (\is_int($width)) {
120
			$width=Wide::getConstants()["W" . $width];
121
		}
122
		$this->addToPropertyCtrl("class", $width, Wide::getConstants());
123
		return $this->addToPropertyCtrl("class", "wide", array ("wide" ));
124
	}
125
126
	public function toDelete(){
127
		$this->_deleted=true;