| @@ -9,7 +9,6 @@ | ||
| 9 | 9 | use Ajax\semantic\html\base\HtmlSemCollection; | 
| 10 | 10 | use Ajax\semantic\html\base\traits\TextAlignmentTrait; | 
| 11 | 11 | use Ajax\semantic\html\content\HtmlGridCol; | 
| 12 | -use Ajax\semantic\html\elements\HtmlDivider; | |
| 13 | 12 | |
| 14 | 13 | /** | 
| 15 | 14 | * Semantic Grid component | 
| @@ -20,8 +20,9 @@ discard block | ||
| 20 | 20 |  	public function __construct($identifier, $width=NULL) { | 
| 21 | 21 | parent::__construct($identifier, "div"); | 
| 22 | 22 |  		$this->setClass("column"); | 
| 23 | - if (isset($width)) | |
| 24 | - $this->setWidth($width); | |
| 23 | +		if (isset($width)) { | |
| 24 | + $this->setWidth($width); | |
| 25 | + } | |
| 25 | 26 | } | 
| 26 | 27 | |
| 27 | 28 | /** | 
| @@ -48,10 +49,11 @@ discard block | ||
| 48 | 49 | |
| 49 | 50 |  	public function addDivider($vertical=true, $content=NULL) { | 
| 50 | 51 |  		$divider=new HtmlDivider("", $content); | 
| 51 | - if ($vertical) | |
| 52 | - $divider->setVertical(); | |
| 53 | - else | |
| 54 | - $divider->setHorizontal(); | |
| 52 | +		if ($vertical) { | |
| 53 | + $divider->setVertical(); | |
| 54 | +		} else { | |
| 55 | + $divider->setHorizontal(); | |
| 56 | + } | |
| 55 | 57 |  		$this->wrap("", $divider); | 
| 56 | 58 | return $divider; | 
| 57 | 59 | } | 
| @@ -68,7 +68,7 @@ discard block | ||
| 68 | 68 | * @return \Ajax\semantic\html\HtmlIcon | 
| 69 | 69 | */ | 
| 70 | 70 |  	public function setFlipped($sens="horizontally") { | 
| 71 | -		return $this->addToProperty("class", "flipped " . $sens); | |
| 71 | +		return $this->addToProperty("class", "flipped ".$sens); | |
| 72 | 72 | } | 
| 73 | 73 | |
| 74 | 74 | /** | 
| @@ -77,7 +77,7 @@ discard block | ||
| 77 | 77 | * @return \Ajax\semantic\html\HtmlIcon | 
| 78 | 78 | */ | 
| 79 | 79 |  	public function setRotated($sens="clockwise") { | 
| 80 | -		return $this->addToProperty("class", "rotated " . $sens); | |
| 80 | +		return $this->addToProperty("class", "rotated ".$sens); | |
| 81 | 81 | } | 
| 82 | 82 | |
| 83 | 83 | /** | 
| @@ -86,7 +86,7 @@ discard block | ||
| 86 | 86 | */ | 
| 87 | 87 |  	public function asLink($href=NULL) { | 
| 88 | 88 |  		if (isset($href)) { | 
| 89 | -			$this->wrap("<a href='" . $href . "'>", "</a>"); | |
| 89 | +			$this->wrap("<a href='".$href."'>", "</a>"); | |
| 90 | 90 | } | 
| 91 | 91 |  		return $this->addToProperty("class", "link"); | 
| 92 | 92 | } | 
| @@ -102,9 +102,9 @@ discard block | ||
| 102 | 102 | */ | 
| 103 | 103 |  	public function setBordered($inverted=false) { | 
| 104 | 104 | $invertedStr=""; | 
| 105 | - if ($inverted !== false) | |
| 105 | + if ($inverted!==false) | |
| 106 | 106 | $invertedStr=" inverted"; | 
| 107 | -		return $this->addToProperty("class", "bordered" . $invertedStr); | |
| 107 | +		return $this->addToProperty("class", "bordered".$invertedStr); | |
| 108 | 108 | } | 
| 109 | 109 | |
| 110 | 110 | /** | 
| @@ -102,8 +102,9 @@ | ||
| 102 | 102 | */ | 
| 103 | 103 |  	public function setBordered($inverted=false) { | 
| 104 | 104 | $invertedStr=""; | 
| 105 | - if ($inverted !== false) | |
| 106 | - $invertedStr=" inverted"; | |
| 105 | +		if ($inverted !== false) { | |
| 106 | + $invertedStr=" inverted"; | |
| 107 | + } | |
| 107 | 108 |  		return $this->addToProperty("class", "bordered" . $invertedStr); | 
| 108 | 109 | } | 
| 109 | 110 | |
| @@ -22,7 +22,7 @@ discard block | ||
| 22 | 22 | * @return \Ajax\semantic\html\elements\HtmlDivider | 
| 23 | 23 | */ | 
| 24 | 24 |  	public function setVertical() { | 
| 25 | -		return $this->addToPropertyCtrl("class", "vertical", array ("vertical","horizontal" )); | |
| 25 | +		return $this->addToPropertyCtrl("class", "vertical", array("vertical", "horizontal")); | |
| 26 | 26 | } | 
| 27 | 27 | |
| 28 | 28 | /** | 
| @@ -30,7 +30,7 @@ discard block | ||
| 30 | 30 | * @return \Ajax\semantic\html\elements\HtmlDivider | 
| 31 | 31 | */ | 
| 32 | 32 |  	public function setHorizontal() { | 
| 33 | -		return $this->addToPropertyCtrl("class", "horizontal", array ("vertical","horizontal" )); | |
| 33 | +		return $this->addToPropertyCtrl("class", "horizontal", array("vertical", "horizontal")); | |
| 34 | 34 | } | 
| 35 | 35 | |
| 36 | 36 | /** | 
| @@ -9,11 +9,11 @@ discard block | ||
| 9 | 9 | const ACTIVE="active", DISABLED="disabled", ERROR="error", FOCUS="focus", LOADING="loading", NEGATIVE="negative", POSITIVE="positive", SUCCESS="success", WARNING="warning"; | 
| 10 | 10 | |
| 11 | 11 |  	public static function add($state, $elements) { | 
| 12 | -		if (\is_array($state) === false) { | |
| 12 | +		if (\is_array($state)===false) { | |
| 13 | 13 |  			$state=\explode(" ", $state); | 
| 14 | 14 | } | 
| 15 | 15 |  		if (\is_array($elements)) { | 
| 16 | -			foreach ( $elements as $element ) { | |
| 16 | +			foreach ($elements as $element) { | |
| 17 | 17 |  				if ($element instanceof BaseHtml) { | 
| 18 | 18 | self::_add($state, $element); | 
| 19 | 19 | } | 
| @@ -22,8 +22,8 @@ discard block | ||
| 22 | 22 | } | 
| 23 | 23 | |
| 24 | 24 |  	private static function _add($states, $element) { | 
| 25 | -		foreach ( $states as $state ) { | |
| 26 | -			$element->addToPropertyCtrl("class", $state, array ($state )); | |
| 25 | +		foreach ($states as $state) { | |
| 26 | +			$element->addToPropertyCtrl("class", $state, array($state)); | |
| 27 | 27 | } | 
| 28 | 28 | } | 
| 29 | 29 | } | 
| 30 | 30 | \ No newline at end of file |