Completed
Push — master ( 2aad8b...141d55 )
by Jean-Christophe
03:21
created
Ajax/common/html/HtmlCollection.php 2 patches
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -12,36 +12,36 @@  discard block
 block discarded – undo
12 12
  */
13 13
 abstract class HtmlCollection extends HtmlDoubleElement {
14 14
 
15
-	public function __construct($identifier,$tagName="div"){
16
-		parent::__construct($identifier,$tagName);
15
+	public function __construct($identifier, $tagName="div") {
16
+		parent::__construct($identifier, $tagName);
17 17
 		$this->content=array();
18 18
 	}
19 19
 
20
-	public function addItems($items){
21
-		if(JArray::isAssociative($items)){
22
-			foreach ($items as $k=>$v){
23
-				$this->addItem([$k,$v]);
20
+	public function addItems($items) {
21
+		if (JArray::isAssociative($items)) {
22
+			foreach ($items as $k=>$v) {
23
+				$this->addItem([$k, $v]);
24 24
 			}
25
-		}else{
26
-			foreach ($items as $item){
25
+		} else {
26
+			foreach ($items as $item) {
27 27
 				$this->addItem($item);
28 28
 			}
29 29
 		}
30 30
 		return $this;
31 31
 	}
32 32
 
33
-	public function setItems($items){
33
+	public function setItems($items) {
34 34
 		$this->content=$items;
35 35
 		return $this;
36 36
 	}
37 37
 
38
-	public function getItems(){
38
+	public function getItems() {
39 39
 		return $this->content;
40 40
 	}
41 41
 
42
-	protected function getItemToAdd($item){
42
+	protected function getItemToAdd($item) {
43 43
 		$itemO=$item;
44
-		if($this->createCondition($item)===true){
44
+		if ($this->createCondition($item)===true) {
45 45
 			$itemO=$this->createItem($item);
46 46
 		}
47 47
 		return $itemO;
@@ -52,15 +52,15 @@  discard block
 block discarded – undo
52 52
 	 * @param HtmlDoubleElement|string $item
53 53
 	 * @return \Ajax\common\html\HtmlDoubleElement
54 54
 	 */
55
-	public function addItem($item){
55
+	public function addItem($item) {
56 56
 		$itemO=$this->getItemToAdd($item);
57 57
 		$this->addContent($itemO);
58 58
 		return $itemO;
59 59
 	}
60 60
 
61
-	public function insertItem($item,$position=0){
61
+	public function insertItem($item, $position=0) {
62 62
 		$itemO=$this->getItemToAdd($item);
63
-		\array_splice( $this->content, $position, 0, array($itemO));
63
+		\array_splice($this->content, $position, 0, array($itemO));
64 64
 		return $itemO;
65 65
 	}
66 66
 
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
 		return $this;
84 84
 	}
85 85
 
86
-	public function removeItem($index){
86
+	public function removeItem($index) {
87 87
 		return array_splice($this->content, $index, 1);
88 88
 	}
89 89
 
90
-	public function count(){
90
+	public function count() {
91 91
 		return \sizeof($this->content);
92 92
 	}
93 93
 
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 		return $this->addItem($function($object));
99 99
 	}
100 100
 
101
-	public function apply($callBack){
102
-		foreach ($this->content as $item){
101
+	public function apply($callBack) {
102
+		foreach ($this->content as $item) {
103 103
 			$callBack($item);
104 104
 		}
105 105
 		return $this;
@@ -119,40 +119,40 @@  discard block
 block discarded – undo
119 119
 	 */
120 120
 	protected abstract function createItem($value);
121 121
 
122
-	protected function createCondition($value){
122
+	protected function createCondition($value) {
123 123
 		return \is_object($value)===false;
124 124
 	}
125 125
 
126
-	protected function contentAs($tagName){
127
-		foreach ($this->content as $item){
126
+	protected function contentAs($tagName) {
127
+		foreach ($this->content as $item) {
128 128
 			$item->setTagName($tagName);
129 129
 		}
130 130
 		return $this;
131 131
 	}
132 132
 
133
-	public function setProperties($properties){
133
+	public function setProperties($properties) {
134 134
 		$i=0;
135
-		foreach ($properties as $k=>$v){
135
+		foreach ($properties as $k=>$v) {
136 136
 			$c=$this->content[$i++];
137
-			if(isset($c))
138
-				$c->setProperty($k,$v);
137
+			if (isset($c))
138
+				$c->setProperty($k, $v);
139 139
 			else
140 140
 				return $this;
141 141
 		}
142 142
 		return $this;
143 143
 	}
144 144
 
145
-	public function setPropertyValues($property,$values){
145
+	public function setPropertyValues($property, $values) {
146 146
 		$i=0;
147
-		if(\is_array($values)===false){
148
-			$values=\array_fill(0, $this->count(),$values);
147
+		if (\is_array($values)===false) {
148
+			$values=\array_fill(0, $this->count(), $values);
149 149
 		}
150
-		foreach ($values as $value){
150
+		foreach ($values as $value) {
151 151
 			$c=$this->content[$i++];
152
-			if(isset($c)===true){
153
-				$c->setProperty($property,$value);
152
+			if (isset($c)===true) {
153
+				$c->setProperty($property, $value);
154 154
 			}
155
-			else{
155
+			else {
156 156
 				return $this;
157 157
 			}
158 158
 		}
Please login to merge, or discard this patch.
Braces   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 			foreach ($items as $k=>$v){
23 23
 				$this->addItem([$k,$v]);
24 24
 			}
25
-		}else{
25
+		} else{
26 26
 			foreach ($items as $item){
27 27
 				$this->addItem($item);
28 28
 			}
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
 	 * @return \Ajax\common\html\HtmlDoubleElement
71 71
 	 */
72 72
 	public function getItem($index) {
73
-		if (is_int($index))
74
-			return $this->content[$index];
75
-		else {
73
+		if (is_int($index)) {
74
+					return $this->content[$index];
75
+		} else {
76 76
 			$elm=$this->getElementById($index, $this->content);
77 77
 			return $elm;
78 78
 		}
@@ -134,10 +134,11 @@  discard block
 block discarded – undo
134 134
 		$i=0;
135 135
 		foreach ($properties as $k=>$v){
136 136
 			$c=$this->content[$i++];
137
-			if(isset($c))
138
-				$c->setProperty($k,$v);
139
-			else
140
-				return $this;
137
+			if(isset($c)) {
138
+							$c->setProperty($k,$v);
139
+			} else {
140
+							return $this;
141
+			}
141 142
 		}
142 143
 		return $this;
143 144
 	}
@@ -151,8 +152,7 @@  discard block
 block discarded – undo
151 152
 			$c=$this->content[$i++];
152 153
 			if(isset($c)===true){
153 154
 				$c->setProperty($property,$value);
154
-			}
155
-			else{
155
+			} else{
156 156
 				return $this;
157 157
 			}
158 158
 		}
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlShape.php 2 patches
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
 use Ajax\semantic\html\base\HtmlSemDoubleElement;
8 8
 
9 9
 
10
-class HtmlShape extends HtmlSemCollection{
10
+class HtmlShape extends HtmlSemCollection {
11 11
 
12 12
 	protected $_params=array();
13 13
 	protected $_autoActive=true;
14 14
 
15
-	public function __construct( $identifier, $sides){
16
-		parent::__construct( $identifier, "div", "ui shape");
15
+	public function __construct($identifier, $sides) {
16
+		parent::__construct($identifier, "div", "ui shape");
17 17
 		$this->_template="<%tagName% id='%identifier%' %properties%><div class='sides'>%wrapContentBefore%%content%%wrapContentAfter%</div></%tagName%>";
18 18
 		$this->addItems($sides);
19 19
 	}
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	 * {@inheritDoc}
23 23
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
24 24
 	 */
25
-	protected function createItem($value){
26
-		if(\is_object($value)===false){
27
-			$value=new HtmlSemDoubleElement("","div","content",$value);
25
+	protected function createItem($value) {
26
+		if (\is_object($value)===false) {
27
+			$value=new HtmlSemDoubleElement("", "div", "content", $value);
28 28
 		}
29 29
 		return new HtmlShapeItem("side-".$this->identifier."-".$this->count(), $value);
30 30
 	}
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	 * {@inheritDoc}
34 34
 	 * @see \Ajax\common\html\HtmlCollection::createCondition()
35 35
 	 */
36
-	protected function createCondition($value){
36
+	protected function createCondition($value) {
37 37
 		return ($value instanceof HtmlShapeItem)===false;
38 38
 	}
39 39
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	 * @param int $index
42 42
 	 * @return \Ajax\semantic\html\content\HtmlShapeItem
43 43
 	 */
44
-	public function getSide($index){
44
+	public function getSide($index) {
45 45
 		return $this->getItem($index);
46 46
 	}
47 47
 
@@ -49,34 +49,34 @@  discard block
 block discarded – undo
49 49
 	 * @param int $index
50 50
 	 * @return mixed|NULL
51 51
 	 */
52
-	public function getSideContent($index){
53
-		$item= $this->getItem($index);
54
-		if(isset($item))
52
+	public function getSideContent($index) {
53
+		$item=$this->getItem($index);
54
+		if (isset($item))
55 55
 			return $item->getContent();
56 56
 		return null;
57 57
 	}
58 58
 
59
-	public function jsDo($action){
59
+	public function jsDo($action) {
60 60
 		return "$('#".$this->identifier."').shape('".$action."');";
61 61
 	}
62 62
 
63
-	public function jsFlipleft(){
63
+	public function jsFlipleft() {
64 64
 		return $this->jsDo("flip left");
65 65
 	}
66 66
 
67
-	public function setActiveSide($index){
67
+	public function setActiveSide($index) {
68 68
 		$side=$this->getSide($index);
69
-		if(isset($side)){
69
+		if (isset($side)) {
70 70
 			$side->setActive(true);
71 71
 		}
72 72
 		return $this;
73 73
 	}
74 74
 
75
-	public function asCube(){
75
+	public function asCube() {
76 76
 		return $this->addToPropertyCtrl("class", "cube", ["cube"]);
77 77
 	}
78 78
 
79
-	public function asText(){
79
+	public function asText() {
80 80
 		return $this->addToPropertyCtrl("class", "text", ["text"]);
81 81
 	}
82 82
 
@@ -85,15 +85,15 @@  discard block
 block discarded – undo
85 85
 	 * @see BaseHtml::run()
86 86
 	 */
87 87
 	public function run(JsUtils $js) {
88
-		if (isset($this->_bsComponent) === false)
89
-			$this->_bsComponent=$js->semantic()->shape("#" . $this->identifier, $this->_params);
88
+		if (isset($this->_bsComponent)===false)
89
+			$this->_bsComponent=$js->semantic()->shape("#".$this->identifier, $this->_params);
90 90
 		$this->addEventsOnRun($js);
91 91
 		return $this->_bsComponent;
92 92
 	}
93 93
 
94 94
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
95
-		if($this->_autoActive)
95
+		if ($this->_autoActive)
96 96
 			$this->setActiveSide(0);
97
-		return parent::compile($js,$view);
97
+		return parent::compile($js, $view);
98 98
 	}
99 99
 }
100 100
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public function getSideContent($index){
53 53
 		$item= $this->getItem($index);
54
-		if(isset($item))
55
-			return $item->getContent();
54
+		if(isset($item)) {
55
+					return $item->getContent();
56
+		}
56 57
 		return null;
57 58
 	}
58 59
 
@@ -85,15 +86,17 @@  discard block
 block discarded – undo
85 86
 	 * @see BaseHtml::run()
86 87
 	 */
87 88
 	public function run(JsUtils $js) {
88
-		if (isset($this->_bsComponent) === false)
89
-			$this->_bsComponent=$js->semantic()->shape("#" . $this->identifier, $this->_params);
89
+		if (isset($this->_bsComponent) === false) {
90
+					$this->_bsComponent=$js->semantic()->shape("#" . $this->identifier, $this->_params);
91
+		}
90 92
 		$this->addEventsOnRun($js);
91 93
 		return $this->_bsComponent;
92 94
 	}
93 95
 
94 96
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
95
-		if($this->_autoActive)
96
-			$this->setActiveSide(0);
97
+		if($this->_autoActive) {
98
+					$this->setActiveSide(0);
99
+		}
97 100
 		return parent::compile($js,$view);
98 101
 	}
99 102
 }
100 103
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlButtonGroups.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -15,33 +15,33 @@  discard block
 block discarded – undo
15 15
 
16 16
 	public function __construct($identifier, $elements=array(), $asIcons=false) {
17 17
 		parent::__construct($identifier, "div", "ui buttons");
18
-		if ($asIcons === true)
18
+		if ($asIcons===true)
19 19
 			$this->asIcons();
20 20
 		$this->addElements($elements, $asIcons);
21 21
 	}
22
-	protected function createItem($value){
23
-		return new HtmlButton("button-" . $this->identifier . "-" . \sizeof($this->content), $value);
22
+	protected function createItem($value) {
23
+		return new HtmlButton("button-".$this->identifier."-".\sizeof($this->content), $value);
24 24
 	}
25 25
 
26 26
 
27 27
 	public function addElement($element, $asIcon=false) {
28 28
 		$item=$this->addItem($element);
29
-		if($asIcon)
29
+		if ($asIcon)
30 30
 			$item->asIcon($element);
31 31
 		return $item;
32 32
 	}
33 33
 
34 34
 	public function addElements($elements, $asIcons=false) {
35
-		foreach ( $elements as $element ) {
35
+		foreach ($elements as $element) {
36 36
 			$this->addElement($element, $asIcons);
37 37
 		}
38 38
 		return $this;
39 39
 	}
40 40
 
41 41
 	public function insertOr($aferIndex=0, $or="or") {
42
-		$orElement=new HtmlSemDoubleElement("or-" . $this->identifier, "div", "or");
42
+		$orElement=new HtmlSemDoubleElement("or-".$this->identifier, "div", "or");
43 43
 		$orElement->setProperty("data-text", $or);
44
-		array_splice($this->content, $aferIndex + 1, 0, array ($orElement ));
44
+		array_splice($this->content, $aferIndex+1, 0, array($orElement));
45 45
 		return $this;
46 46
 	}
47 47
 
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
 	}
55 55
 
56 56
 	public function asIcons() {
57
-		foreach ( $this->content as $item ) {
58
-			if($item instanceof HtmlButton)
57
+		foreach ($this->content as $item) {
58
+			if ($item instanceof HtmlButton)
59 59
 			$item->asIcon($item->getContent());
60 60
 		}
61 61
 		return $this->addToProperty("class", "icons");
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::on()
89 89
 	 */
90 90
 	public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
91
-		foreach ( $this->content as $element ) {
91
+		foreach ($this->content as $element) {
92 92
 			$element->on($event, $jsCode, $stopPropagation, $preventDefault);
93 93
 		}
94 94
 		return $this;
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
 	public function addClasses($classes=array()) {
102 102
 		$i=0;
103
-		foreach ( $this->content as $button ) {
103
+		foreach ($this->content as $button) {
104 104
 			$button->addToProperty("class", $classes[$i++]);
105 105
 		}
106 106
 		return $this;
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@  discard block
 block discarded – undo
15 15
 
16 16
 	public function __construct($identifier, $elements=array(), $asIcons=false) {
17 17
 		parent::__construct($identifier, "div", "ui buttons");
18
-		if ($asIcons === true)
19
-			$this->asIcons();
18
+		if ($asIcons === true) {
19
+					$this->asIcons();
20
+		}
20 21
 		$this->addElements($elements, $asIcons);
21 22
 	}
22 23
 	protected function createItem($value){
@@ -26,8 +27,9 @@  discard block
 block discarded – undo
26 27
 
27 28
 	public function addElement($element, $asIcon=false) {
28 29
 		$item=$this->addItem($element);
29
-		if($asIcon)
30
-			$item->asIcon($element);
30
+		if($asIcon) {
31
+					$item->asIcon($element);
32
+		}
31 33
 		return $item;
32 34
 	}
33 35
 
@@ -55,8 +57,9 @@  discard block
 block discarded – undo
55 57
 
56 58
 	public function asIcons() {
57 59
 		foreach ( $this->content as $item ) {
58
-			if($item instanceof HtmlButton)
59
-			$item->asIcon($item->getContent());
60
+			if($item instanceof HtmlButton) {
61
+						$item->asIcon($item->getContent());
62
+			}
60 63
 		}
61 64
 		return $this->addToProperty("class", "icons");
62 65
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlDivider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 	/**
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		return $this->addToProperty("class", "inverted");
66 66
 	}
67 67
 
68
-	public function setIgnored(){
68
+	public function setIgnored() {
69 69
 		return $this->addToProperty("class", "ignored");
70 70
 	}
71 71
 }
72 72
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlShapeItem.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@
 block discarded – undo
5 5
 
6 6
 class HtmlShapeItem extends HtmlSemDoubleElement {
7 7
 	public function __construct($identifier, $content) {
8
-		parent::__construct($identifier,"div","side",$content);
8
+		parent::__construct($identifier, "div", "side", $content);
9 9
 	}
10 10
 
11
-	public function setActive($value=true){
12
-		if($value){
11
+	public function setActive($value=true) {
12
+		if ($value) {
13 13
 			$this->addToPropertyCtrl("class", "active", ["active"]);
14
-		}else{
14
+		} else {
15 15
 			$this->removePropertyValue("class", "active");
16 16
 		}
17 17
 		return $this;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 		$viewVars=$view->viewVars;
14 14
 		if (isset($viewVars["q"]) === false) {
15 15
 			$controls=array ();
16
-		}else{
16
+		} else{
17 17
 			$controls=$viewVars["q"];
18 18
 		}
19 19
 		$controls[$identifier]=$content;
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlAbsractItem.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 abstract class HtmlAbsractItem extends HtmlSemDoubleElement {
13 13
 
14
-	public function __construct($identifier, $baseClass,$content=NULL) {
14
+	public function __construct($identifier, $baseClass, $content=NULL) {
15 15
 		parent::__construct($identifier, "div", $baseClass);
16 16
 		$this->content=array();
17 17
 		$this->initContent($content);
@@ -19,53 +19,53 @@  discard block
 block discarded – undo
19 19
 
20 20
 	protected abstract function initContent($content);
21 21
 
22
-	public function setIcon($icon){
22
+	public function setIcon($icon) {
23 23
 		$this->content["icon"]=new HtmlIcon("icon-".$this->identifier, $icon);
24 24
 	}
25 25
 
26
-	public function setImage($image){
26
+	public function setImage($image) {
27 27
 		$image=new HtmlImg("icon-".$this->identifier, $image);
28 28
 		$image->asAvatar();
29 29
 		$this->content["image"]=$image;
30 30
 	}
31 31
 
32
-	private function createContent(){
33
-		$this->content["content"]=new HtmlSemDoubleElement("content-".$this->identifier,"div","content");
32
+	private function createContent() {
33
+		$this->content["content"]=new HtmlSemDoubleElement("content-".$this->identifier, "div", "content");
34 34
 		return $this->content["content"];
35 35
 	}
36 36
 
37
-	public function setTitle($title,$description=NULL,$baseClass="title"){
38
-		$title=new HtmlSemDoubleElement("","div",$baseClass,$title);
39
-		if(\array_key_exists("content", $this->content)===false){
37
+	public function setTitle($title, $description=NULL, $baseClass="title") {
38
+		$title=new HtmlSemDoubleElement("", "div", $baseClass, $title);
39
+		if (\array_key_exists("content", $this->content)===false) {
40 40
 			$this->createContent();
41 41
 		}
42 42
 		$this->content["content"]->addContent($title);
43
-		if(isset($description)){
44
-			$description=new HtmlSemDoubleElement("","div","description",$description);
43
+		if (isset($description)) {
44
+			$description=new HtmlSemDoubleElement("", "div", "description", $description);
45 45
 			$this->content["content"]->addContent($description);
46 46
 		}
47 47
 		return $this;
48 48
 	}
49 49
 
50
-	public function getPart($partName="header"){
51
-		$content=\array_merge($this->content["content"]->getContent(),array(@$this->content["icon"],@$this->content["image"]));
50
+	public function getPart($partName="header") {
51
+		$content=\array_merge($this->content["content"]->getContent(), array(@$this->content["icon"], @$this->content["image"]));
52 52
 		return $this->getElementByPropertyValue("class", $partName, $content);
53 53
 	}
54 54
 
55
-	public function setActive($value=true){
56
-		if($value){
55
+	public function setActive($value=true) {
56
+		if ($value) {
57 57
 			$this->setTagName("div");
58 58
 			$this->removeProperty("href");
59 59
 			$this->addToPropertyCtrl("class", "active", array("active"));
60
-		}else{
60
+		} else {
61 61
 			$this->removePropertyValue("class", "active");
62 62
 		}
63 63
 		return $this;
64 64
 	}
65 65
 
66
-	public function asLink($href=NULL,$part=NULL){
66
+	public function asLink($href=NULL, $part=NULL) {
67 67
 		$this->setTagName("a");
68
-		if(isset($href))
68
+		if (isset($href))
69 69
 			$this->setProperty("href", $href);
70 70
 		return $this;
71 71
 	}
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
78 78
 	 */
79 79
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
80
-		if(\is_array($this->content))
81
-			$this->content=JArray::sortAssociative($this->content, [ "icon","image","content" ]);
80
+		if (\is_array($this->content))
81
+			$this->content=JArray::sortAssociative($this->content, ["icon", "image", "content"]);
82 82
 		return parent::compile($js, $view);
83 83
 	}
84 84
 }
85 85
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 			$this->setTagName("div");
58 58
 			$this->removeProperty("href");
59 59
 			$this->addToPropertyCtrl("class", "active", array("active"));
60
-		}else{
60
+		} else{
61 61
 			$this->removePropertyValue("class", "active");
62 62
 		}
63 63
 		return $this;
@@ -65,8 +65,9 @@  discard block
 block discarded – undo
65 65
 
66 66
 	public function asLink($href=NULL,$part=NULL){
67 67
 		$this->setTagName("a");
68
-		if(isset($href))
69
-			$this->setProperty("href", $href);
68
+		if(isset($href)) {
69
+					$this->setProperty("href", $href);
70
+		}
70 71
 		return $this;
71 72
 	}
72 73
 
@@ -77,8 +78,9 @@  discard block
 block discarded – undo
77 78
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
78 79
 	 */
79 80
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
80
-		if(\is_array($this->content))
81
-			$this->content=JArray::sortAssociative($this->content, [ "icon","image","content" ]);
81
+		if(\is_array($this->content)) {
82
+					$this->content=JArray::sortAssociative($this->content, [ "icon","image","content" ]);
83
+		}
82 84
 		return parent::compile($js, $view);
83 85
 	}
84 86
 }
85 87
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/traits/SemanticComponentsTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 	 * @param string|array $params
127 127
 	 * @return Modal
128 128
 	 */
129
-	public function modal($attachTo=NULL, $params=NULL,$paramsParts=NULL) {
130
-		$result= $this->addComponent(new Modal($this->js), $attachTo, $params);
129
+	public function modal($attachTo=NULL, $params=NULL, $paramsParts=NULL) {
130
+		$result=$this->addComponent(new Modal($this->js), $attachTo, $params);
131 131
 		$result->setParamParts($paramsParts);
132 132
 		return $result;
133 133
 	}
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 * @return Tab
139 139
 	 */
140 140
 	public function tab($attachTo=NULL, $params=NULL) {
141
-		$result= $this->addComponent(new Tab($this->js), $attachTo, $params);
141
+		$result=$this->addComponent(new Tab($this->js), $attachTo, $params);
142 142
 		return $result;
143 143
 	}
144 144
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	 * @return Shape
149 149
 	 */
150 150
 	public function shape($attachTo=NULL, $params=NULL) {
151
-		$result= $this->addComponent(new Shape($this->js), $attachTo, $params);
151
+		$result=$this->addComponent(new Shape($this->js), $attachTo, $params);
152 152
 		return $result;
153 153
 	}
154 154
 }
155 155
\ No newline at end of file
Please login to merge, or discard this patch.