Passed
Push — master ( 8fc168...717978 )
by Jean-Christophe
03:25
created
Ajax/semantic/html/elements/HtmlIcon.php 2 patches
Braces   +14 added lines, -10 removed lines patch added patch discarded remove patch
@@ -89,8 +89,9 @@  discard block
 block discarded – undo
89 89
 	public function asLink($href=NULL,$target=NULL) {
90 90
 		if (isset($href)) {
91 91
 			$_target="";
92
-			if(isset($target))
93
-				$_target="target='{$target}'";
92
+			if(isset($target)) {
93
+							$_target="target='{$target}'";
94
+			}
94 95
 			$this->wrap("<a href='" . $href . "' {$_target}>", "</a>");
95 96
 		}
96 97
 		return $this->addToProperty("class", "link");
@@ -107,8 +108,9 @@  discard block
 block discarded – undo
107 108
 	 */
108 109
 	public function setBordered($inverted=false) {
109 110
 		$invertedStr="";
110
-		if ($inverted !== false)
111
-			$invertedStr=" inverted";
111
+		if ($inverted !== false) {
112
+					$invertedStr=" inverted";
113
+		}
112 114
 		return $this->addToProperty("class", "bordered" . $invertedStr);
113 115
 	}
114 116
 
@@ -121,12 +123,14 @@  discard block
 block discarded – undo
121 123
 	}
122 124
 
123 125
 	public function addLabel($label, $before=false, $icon=NULL) {
124
-		if($before)
125
-			$this->wrap($label);
126
-		else
127
-			$this->wrap("", $label);
128
-		if(isset($icon))
129
-			$this->addToIcon($icon);
126
+		if($before) {
127
+					$this->wrap($label);
128
+		} else {
129
+					$this->wrap("", $label);
130
+		}
131
+		if(isset($icon)) {
132
+					$this->addToIcon($icon);
133
+		}
130 134
 		return $this;
131 135
 	}
132 136
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 * @return HtmlIcon
70 70
 	 */
71 71
 	public function setFlipped($sens="horizontally") {
72
-		return $this->addToProperty("class", "flipped " . $sens);
72
+		return $this->addToProperty("class", "flipped ".$sens);
73 73
 	}
74 74
 
75 75
 	/**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 * @return HtmlIcon
79 79
 	 */
80 80
 	public function setRotated($sens="clockwise") {
81
-		return $this->addToProperty("class", "rotated " . $sens);
81
+		return $this->addToProperty("class", "rotated ".$sens);
82 82
 	}
83 83
 
84 84
 	/**
@@ -87,12 +87,12 @@  discard block
 block discarded – undo
87 87
 	 * @param string $target
88 88
 	 * @return HtmlIcon
89 89
 	 */
90
-	public function asLink($href=NULL,$target=NULL) {
90
+	public function asLink($href=NULL, $target=NULL) {
91 91
 		if (isset($href)) {
92 92
 			$_target="";
93
-			if(isset($target))
93
+			if (isset($target))
94 94
 				$_target="target='{$target}'";
95
-			$this->wrap("<a href='" . $href . "' {$_target}>", "</a>");
95
+			$this->wrap("<a href='".$href."' {$_target}>", "</a>");
96 96
 		}
97 97
 		return $this->addToProperty("class", "link");
98 98
 	}
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 	 */
109 109
 	public function setBordered($inverted=false) {
110 110
 		$invertedStr="";
111
-		if ($inverted !== false)
111
+		if ($inverted!==false)
112 112
 			$invertedStr=" inverted";
113
-		return $this->addToProperty("class", "bordered" . $invertedStr);
113
+		return $this->addToProperty("class", "bordered".$invertedStr);
114 114
 	}
115 115
 
116 116
 	/**
@@ -122,11 +122,11 @@  discard block
 block discarded – undo
122 122
 	}
123 123
 
124 124
 	public function addLabel($label, $before=false, $icon=NULL) {
125
-		if($before)
125
+		if ($before)
126 126
 			$this->wrap($label);
127 127
 		else
128 128
 			$this->wrap("", $label);
129
-		if(isset($icon))
129
+		if (isset($icon))
130 130
 			$this->addToIcon($icon);
131 131
 		return $this;
132 132
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlSticky.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,50 +7,50 @@
 block discarded – undo
7 7
 
8 8
 class HtmlSticky extends HtmlSemDoubleElement {
9 9
 
10
-	public function __construct($identifier,$context=NULL,$content=NULL) {
10
+	public function __construct($identifier, $context=NULL, $content=NULL) {
11 11
 		parent::__construct($identifier, "div", "ui sticky", $content);
12
-		if(isset($content))
12
+		if (isset($content))
13 13
 			$this->setContext($context);
14 14
 	}
15 15
 
16
-	public function setContext($context){
16
+	public function setContext($context) {
17 17
 		$this->_params["context"]=$context;
18 18
 		return $this;
19 19
 	}
20 20
 
21
-	public function setFixed($value=NULL){
21
+	public function setFixed($value=NULL) {
22 22
 		$fixed="fixed";
23
-		if(isset($value))
23
+		if (isset($value))
24 24
 			$fixed.=" ".$value;
25
-		return $this->addToProperty("class",$fixed);
25
+		return $this->addToProperty("class", $fixed);
26 26
 	}
27 27
 
28
-	public function setBound($value=NULL){
28
+	public function setBound($value=NULL) {
29 29
 		$bound="bound";
30
-		if(isset($value))
30
+		if (isset($value))
31 31
 			$bound.=" ".$value;
32
-			return $this->addToProperty("class",$bound);
32
+			return $this->addToProperty("class", $bound);
33 33
 	}
34 34
 
35 35
 	/**
36 36
 	 * {@inheritDoc}
37 37
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
38 38
 	 */
39
-	public function run(JsUtils $js){
39
+	public function run(JsUtils $js) {
40 40
 		parent::run($js);
41
-		return $js->semantic()->sticky("#".$this->identifier,$this->_params);
41
+		return $js->semantic()->sticky("#".$this->identifier, $this->_params);
42 42
 	}
43 43
 
44
-	public function setOffset($offset=0){
44
+	public function setOffset($offset=0) {
45 45
 		$this->_params["offset"]=$offset;
46 46
 		return $this;
47 47
 	}
48 48
 
49 49
 
50 50
 
51
-	public function setDebug($verbose=NULL){
51
+	public function setDebug($verbose=NULL) {
52 52
 		$this->_params["debug"]=true;
53
-		if(isset($verbose))
53
+		if (isset($verbose))
54 54
 			$this->_params["verbose"]=true;
55 55
 		return $this;
56 56
 	}
Please login to merge, or discard this patch.
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,8 +9,9 @@  discard block
 block discarded – undo
9 9
 
10 10
 	public function __construct($identifier,$context=NULL,$content=NULL) {
11 11
 		parent::__construct($identifier, "div", "ui sticky", $content);
12
-		if(isset($content))
13
-			$this->setContext($context);
12
+		if(isset($content)) {
13
+					$this->setContext($context);
14
+		}
14 15
 	}
15 16
 
16 17
 	public function setContext($context){
@@ -20,15 +21,17 @@  discard block
 block discarded – undo
20 21
 
21 22
 	public function setFixed($value=NULL){
22 23
 		$fixed="fixed";
23
-		if(isset($value))
24
-			$fixed.=" ".$value;
24
+		if(isset($value)) {
25
+					$fixed.=" ".$value;
26
+		}
25 27
 		return $this->addToProperty("class",$fixed);
26 28
 	}
27 29
 
28 30
 	public function setBound($value=NULL){
29 31
 		$bound="bound";
30
-		if(isset($value))
31
-			$bound.=" ".$value;
32
+		if(isset($value)) {
33
+					$bound.=" ".$value;
34
+		}
32 35
 			return $this->addToProperty("class",$bound);
33 36
 	}
34 37
 
@@ -50,8 +53,9 @@  discard block
 block discarded – undo
50 53
 
51 54
 	public function setDebug($verbose=NULL){
52 55
 		$this->_params["debug"]=true;
53
-		if(isset($verbose))
54
-			$this->_params["verbose"]=true;
56
+		if(isset($verbose)) {
57
+					$this->_params["verbose"]=true;
58
+		}
55 59
 		return $this;
56 60
 	}
57 61
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/traits/HasTimeoutTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@
 block discarded – undo
17 17
 	 * {@inheritDoc}
18 18
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
19 19
 	 */
20
-	public function run(JsUtils $js){
21
-		if(!isset($this->_bsComponent)){
22
-			if(isset($this->_timeout)){
23
-				$js->exec("setTimeout(function() { $('#{$this->identifier}').transition({$this->_closeTransition}); }, {$this->_timeout});",true);
20
+	public function run(JsUtils $js) {
21
+		if (!isset($this->_bsComponent)) {
22
+			if (isset($this->_timeout)) {
23
+				$js->exec("setTimeout(function() { $('#{$this->identifier}').transition({$this->_closeTransition}); }, {$this->_timeout});", true);
24 24
 			}
25 25
 		}
26 26
 		return parent::run($js);
Please login to merge, or discard this patch.
Ajax/semantic/html/views/HtmlCardGroups.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
8 8
 class HtmlCardGroups extends HtmlViewGroups {
9 9
 
10 10
 	public function __construct($identifier, $cards=array()) {
11
-		parent::__construct($identifier, "ui cards",$cards);
11
+		parent::__construct($identifier, "ui cards", $cards);
12 12
 	}
13 13
 
14
-	protected function createElement(){
15
-		return new HtmlCard("card-" . $this->count());
14
+	protected function createElement() {
15
+		return new HtmlCard("card-".$this->count());
16 16
 	}
17 17
 
18 18
 	public function newItem($identifier) {
Please login to merge, or discard this patch.
Ajax/semantic/html/content/view/HtmlViewGroups.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,9 @@
 block discarded – undo
30 30
 			if (isset($extra)) {
31 31
 				$result->addExtraContent($extra);
32 32
 			}
33
-		} else
34
-			$result->addItemContent($value);
33
+		} else {
34
+					$result->addItemContent($value);
35
+		}
35 36
 		return $result;
36 37
 	}
37 38
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 abstract class HtmlViewGroups extends HtmlSemCollection {
11 11
 
12
-	public function __construct($identifier, $uiClass,$items=array()) {
12
+	public function __construct($identifier, $uiClass, $items=array()) {
13 13
 		parent::__construct($identifier, "div", $uiClass);
14 14
 		$this->addItems($items);
15 15
 	}
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	 * @param int $wide
42 42
 	 */
43 43
 	public function setWide($wide) {
44
-		$wide=Wide::getConstants()["W" . $wide];
44
+		$wide=Wide::getConstants()["W".$wide];
45 45
 		return $this->addToPropertyCtrl("class", $wide, Wide::getConstants());
46 46
 	}
47 47
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	/**
51 51
 	 * @return HtmlViewGroups
52 52
 	 */
53
-	public function getItem($index){
53
+	public function getItem($index) {
54 54
 		return parent::getItem($index);
55 55
 	}
56 56
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		return $this->addItem($function($object));
66 66
 	}
67 67
 
68
-	public function run(JsUtils $js){
68
+	public function run(JsUtils $js) {
69 69
 		$result=parent::run($js);
70 70
 		return $result->setItemSelector(".item");
71 71
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/views/HtmlItems.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@
 block discarded – undo
9 9
 class HtmlItems extends HtmlViewGroups {
10 10
 
11 11
 	public function __construct($identifier, $items=[]) {
12
-		parent::__construct($identifier, "ui items",$items);
12
+		parent::__construct($identifier, "ui items", $items);
13 13
 	}
14 14
 
15
-	protected function createElement(){
16
-		return new HtmlItem("item-" . $this->count());
15
+	protected function createElement() {
16
+		return new HtmlItem("item-".$this->count());
17 17
 	}
18 18
 
19 19
 	public function newItem($identifier) {
Please login to merge, or discard this patch.
Ajax/semantic/html/content/view/ContentPartTrait.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,24 +6,24 @@
 block discarded – undo
6 6
  * @author jc
7 7
  * @property mixed $content
8 8
  */
9
-trait ContentPartTrait{
10
-	public function addElementInPart($element,$partKey,$before=false,$force=false){
11
-		$part=$this->getPart($partKey,null,$force);
12
-		if($part instanceof  HtmlSemDoubleElement){
9
+trait ContentPartTrait {
10
+	public function addElementInPart($element, $partKey, $before=false, $force=false) {
11
+		$part=$this->getPart($partKey, null, $force);
12
+		if ($part instanceof  HtmlSemDoubleElement) {
13 13
 			$this->content[$partKey]=$part;
14
-			$part->addContent($element,$before);
14
+			$part->addContent($element, $before);
15 15
 		}
16 16
 		return $this;
17 17
 	}
18 18
 
19
-	public function getPart($partKey, $index=NULL,$force=false) {
19
+	public function getPart($partKey, $index=NULL, $force=false) {
20 20
 		if (\array_key_exists($partKey, $this->content)) {
21 21
 			if (isset($index))
22 22
 				return $this->content[$partKey][$index];
23 23
 			return $this->content[$partKey];
24 24
 		}
25
-		if($force){
26
-			return new HtmlSemDoubleElement($partKey."-".$this->identifier,"div",$partKey);
25
+		if ($force) {
26
+			return new HtmlSemDoubleElement($partKey."-".$this->identifier, "div", $partKey);
27 27
 		}
28 28
 		return NULL;
29 29
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,9 @@
 block discarded – undo
18 18
 
19 19
 	public function getPart($partKey, $index=NULL,$force=false) {
20 20
 		if (\array_key_exists($partKey, $this->content)) {
21
-			if (isset($index))
22
-				return $this->content[$partKey][$index];
21
+			if (isset($index)) {
22
+							return $this->content[$partKey][$index];
23
+			}
23 24
 			return $this->content[$partKey];
24 25
 		}
25 26
 		if($force){
Please login to merge, or discard this patch.
Ajax/semantic/html/content/view/HtmlViewItem.php 2 patches
Braces   +17 added lines, -12 removed lines patch added patch discarded remove patch
@@ -19,8 +19,9 @@  discard block
 block discarded – undo
19 19
 	public function __construct($identifier,$baseClass,$content=NULL) {
20 20
 		parent::__construct($identifier, "div", $baseClass);
21 21
 		$this->content=["content"=>new HtmlViewContent("content-".$this->identifier)];
22
-		if(isset($content))
23
-			$this->setContent($content);
22
+		if(isset($content)) {
23
+					$this->setContent($content);
24
+		}
24 25
 	}
25 26
 
26 27
 	public function setContent($value){
@@ -31,10 +32,12 @@  discard block
 block discarded – undo
31 32
 			if (isset($image)) {
32 33
 				$this->addImage($image);
33 34
 			}
34
-			if(isset($content))
35
-				$this->content["content"]->setContent($content);
36
-			if(isset($extra))
37
-				$this->addExtraContent($extra);
35
+			if(isset($content)) {
36
+							$this->content["content"]->setContent($content);
37
+			}
38
+			if(isset($extra)) {
39
+							$this->addExtraContent($extra);
40
+			}
38 41
 		}
39 42
 	}
40 43
 
@@ -49,10 +52,11 @@  discard block
 block discarded – undo
49 52
 		if (\array_key_exists($key, $this->content) === false) {
50 53
 			$this->content[$key]=[];
51 54
 		}
52
-		if($this->content[$key] instanceof HtmlViewContent)
53
-			$this->content[$key]->addElement($element);
54
-		else
55
-			$this->content[$key][]=$element;
55
+		if($this->content[$key] instanceof HtmlViewContent) {
56
+					$this->content[$key]->addElement($element);
57
+		} else {
58
+					$this->content[$key][]=$element;
59
+		}
56 60
 		return $element;
57 61
 	}
58 62
 
@@ -153,8 +157,9 @@  discard block
 block discarded – undo
153 157
 		$this->addToProperty("class", "link");
154 158
 		if ($href !== "") {
155 159
 			$this->setProperty("href", $href);
156
-			if (isset($target))
157
-				$this->setProperty("target", $target);
160
+			if (isset($target)) {
161
+							$this->setProperty("target", $target);
162
+			}
158 163
 		}
159 164
 		return $this;
160 165
 	}
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -16,14 +16,14 @@  discard block
 block discarded – undo
16 16
 abstract class HtmlViewItem extends HtmlSemDoubleElement {
17 17
 	use ContentPartTrait;
18 18
 
19
-	public function __construct($identifier,$baseClass,$content=NULL) {
19
+	public function __construct($identifier, $baseClass, $content=NULL) {
20 20
 		parent::__construct($identifier, "div", $baseClass);
21 21
 		$this->content=["content"=>new HtmlViewContent("content-".$this->identifier)];
22
-		if(isset($content))
22
+		if (isset($content))
23 23
 			$this->setContent($content);
24 24
 	}
25 25
 
26
-	public function setContent($value){
26
+	public function setContent($value) {
27 27
 		if (\is_array($value)) {
28 28
 			$image=JArray::getValue($value, "image", 0);
29 29
 			$content=JArray::getValue($value, "content", 1);
@@ -31,57 +31,57 @@  discard block
 block discarded – undo
31 31
 			if (isset($image)) {
32 32
 				$this->addImage($image);
33 33
 			}
34
-			if(isset($content))
34
+			if (isset($content))
35 35
 				$this->content["content"]->setContent($content);
36
-			if(isset($extra))
36
+			if (isset($extra))
37 37
 				$this->addExtraContent($extra);
38 38
 		}
39 39
 	}
40 40
 
41 41
 	private function createContent($content, $baseClass="content") {
42 42
 		$count=\sizeof($this->content);
43
-		$result=new HtmlViewContent("content-" . $count . "-" . $this->identifier, $content);
43
+		$result=new HtmlViewContent("content-".$count."-".$this->identifier, $content);
44 44
 		$result->setClass($baseClass);
45 45
 		return $result;
46 46
 	}
47 47
 
48 48
 	private function addElementIn($key, $element) {
49
-		if (\array_key_exists($key, $this->content) === false) {
49
+		if (\array_key_exists($key, $this->content)===false) {
50 50
 			$this->content[$key]=[];
51 51
 		}
52
-		if($this->content[$key] instanceof HtmlViewContent)
52
+		if ($this->content[$key] instanceof HtmlViewContent)
53 53
 			$this->content[$key]->addElement($element);
54 54
 		else
55 55
 			$this->content[$key][]=$element;
56 56
 		return $element;
57 57
 	}
58 58
 
59
-	public function addIcon($icon,$before=true){
60
-		return $this->addElementIn("icon",new HtmlIcon("icon-" . $this->identifier, $icon));
59
+	public function addIcon($icon, $before=true) {
60
+		return $this->addElementIn("icon", new HtmlIcon("icon-".$this->identifier, $icon));
61 61
 	}
62 62
 
63 63
 
64 64
 	public function addHeader($header, $niveau=4, $type="page") {
65 65
 		if (!$header instanceof HtmlHeader) {
66
-			$header=new HtmlHeader("header-" . $this->identifier, $niveau, $header, $type);
66
+			$header=new HtmlHeader("header-".$this->identifier, $niveau, $header, $type);
67 67
 		}
68
-		return $this->addElementIn("header",$this->createContent($header));
68
+		return $this->addElementIn("header", $this->createContent($header));
69 69
 	}
70 70
 
71 71
 	public function addImage($image, $title="") {
72 72
 		if (!$image instanceof HtmlImage) {
73
-			$image=new HtmlImage("image-" . $this->identifier, $image, $title);
73
+			$image=new HtmlImage("image-".$this->identifier, $image, $title);
74 74
 		}
75 75
 		$image->setClass("ui image");
76
-		return $this->content["image"]= $image;
76
+		return $this->content["image"]=$image;
77 77
 	}
78 78
 
79
-	public function addReveal($visibleContent, $hiddenContent=NULL, $type=RevealType::FADE, $attributeType=NULL,$key="extra-content") {
79
+	public function addReveal($visibleContent, $hiddenContent=NULL, $type=RevealType::FADE, $attributeType=NULL, $key="extra-content") {
80 80
 		$reveal=$visibleContent;
81 81
 		if (!$visibleContent instanceof HtmlReveal) {
82
-			$reveal=new HtmlReveal("reveral-" . $this->identifier, $visibleContent, $hiddenContent, $type, $attributeType);
82
+			$reveal=new HtmlReveal("reveral-".$this->identifier, $visibleContent, $hiddenContent, $type, $attributeType);
83 83
 		}
84
-		return $this->content[$key]= $reveal;
84
+		return $this->content[$key]=$reveal;
85 85
 	}
86 86
 
87 87
 	public function addRevealImage($visibleContent, $hiddenContent=NULL, $type=RevealType::FADE, $attributeType=NULL) {
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
 		if (!$visibleContent instanceof HtmlReveal) {
90 90
 			return $this->addReveal(new HtmlImage("", $visibleContent), new HtmlImage("", $hiddenContent), $type, $attributeType);
91 91
 		}
92
-		return $this->content["image"]= $reveal;
92
+		return $this->content["image"]=$reveal;
93 93
 	}
94 94
 
95 95
 	public function addExtraContent($content=array()) {
96
-		return $this->content["extra-content"]= $this->createContent($content, "extra content");
96
+		return $this->content["extra-content"]=$this->createContent($content, "extra content");
97 97
 	}
98 98
 
99 99
 	/**
@@ -103,23 +103,23 @@  discard block
 block discarded – undo
103 103
 	 * @param boolean $before
104 104
 	 * @return HtmlButtonGroups
105 105
 	 */
106
-	public function addContentButtons($elements=array(), $asIcons=false,$part="extra",$before=false){
107
-		return $this->content["content"]->addContentButtons($elements,$asIcons,$part, $before);
106
+	public function addContentButtons($elements=array(), $asIcons=false, $part="extra", $before=false) {
107
+		return $this->content["content"]->addContentButtons($elements, $asIcons, $part, $before);
108 108
 	}
109 109
 
110 110
 
111 111
 
112
-	public function addItemHeaderContent($header, $metas=array(), $description=NULL,$extra=NULL) {
113
-		return $this->content["content"]->addHeaderContent($header, $metas, $description,$extra);
112
+	public function addItemHeaderContent($header, $metas=array(), $description=NULL, $extra=NULL) {
113
+		return $this->content["content"]->addHeaderContent($header, $metas, $description, $extra);
114 114
 	}
115 115
 
116 116
 	public function addItemContent($content=array()) {
117 117
 		$count=\sizeof($this->content);
118
-		return $this->addElementIn("content", new HtmlViewContent("content-" . $count . "-" . $this->identifier, $content));
118
+		return $this->addElementIn("content", new HtmlViewContent("content-".$count."-".$this->identifier, $content));
119 119
 	}
120 120
 
121 121
 	public function getItemContent() {
122
-		return $this->getPart("content",null,true);
122
+		return $this->getPart("content", null, true);
123 123
 	}
124 124
 
125 125
 	public function getItemExtraContent() {
@@ -141,13 +141,13 @@  discard block
 block discarded – undo
141 141
 	 * @see HtmlSemDoubleElement::compile()
142 142
 	 */
143 143
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
144
-		$this->content=JArray::sortAssociative($this->content, ["header","image","icon","content","extra-content"]);
144
+		$this->content=JArray::sortAssociative($this->content, ["header", "image", "icon", "content", "extra-content"]);
145 145
 		return parent::compile($js, $view);
146 146
 	}
147 147
 
148
-	public function asLink($href="",$target=NULL) {
148
+	public function asLink($href="", $target=NULL) {
149 149
 		$this->addToProperty("class", "link");
150
-		if ($href !== "") {
150
+		if ($href!=="") {
151 151
 			$this->setProperty("href", $href);
152 152
 			if (isset($target))
153 153
 				$this->setProperty("target", $target);
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlLabel.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -99,12 +99,12 @@
 block discarded – undo
99 99
 	}
100 100
 
101 101
 	/**
102
-	*  Adds an image
103
-	* @param string $src
104
-	* @param string $alt
105
-	* @param boolean $before
106
-	* @return HtmlImg
107
-	*/
102
+	 *  Adds an image
103
+	 * @param string $src
104
+	 * @param string $alt
105
+	 * @param boolean $before
106
+	 * @return HtmlImg
107
+	 */
108 108
 	public function addImage($src, $alt="", $before=true) {
109 109
 		$img=new HtmlImg("image-" . $this->identifier, $src, $alt);
110 110
 		$img->setClass("");
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  * @version 1.001
19 19
  */
20 20
 class HtmlLabel extends HtmlSemDoubleElement {
21
-	use LabeledIconTrait,HasTimeoutTrait;
21
+	use LabeledIconTrait, HasTimeoutTrait;
22 22
 
23 23
 	public function __construct($identifier, $caption="", $icon=NULL, $tagName="div") {
24 24
 		parent::__construct($identifier, $tagName, "ui label");
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
 	 * @return HtmlLabel
34 34
 	 */
35 35
 	public function setPointing($value=Direction::NONE) {
36
-		if($value==="left" || $value==="right")
36
+		if ($value==="left" || $value==="right")
37 37
 			return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing"));
38 38
 		else
39
-			return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing",true));
39
+			return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing", true));
40 40
 	}
41 41
 
42 42
 	/**
@@ -45,15 +45,15 @@  discard block
 block discarded – undo
45 45
 	 * @return HtmlLabel
46 46
 	 */
47 47
 	public function toCorner($side="left") {
48
-		return $this->addToPropertyCtrl("class", $side . " corner", array ("right corner","left corner" ));
48
+		return $this->addToPropertyCtrl("class", $side." corner", array("right corner", "left corner"));
49 49
 	}
50 50
 
51
-	public function setHorizontal(){
52
-		return $this->addToPropertyCtrl("class", "hozizontal",array("horizontal"));
51
+	public function setHorizontal() {
52
+		return $this->addToPropertyCtrl("class", "hozizontal", array("horizontal"));
53 53
 	}
54 54
 
55
-	public function setFloating(){
56
-		return $this->addToPropertyCtrl("class", "floating",array("floating"));
55
+	public function setFloating() {
56
+		return $this->addToPropertyCtrl("class", "floating", array("floating"));
57 57
 	}
58 58
 
59 59
 	/**
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
 		return $this->addToProperty("class", "tag");
65 65
 	}
66 66
 
67
-	public function setEmpty(){
67
+	public function setEmpty() {
68 68
 		$this->content=NULL;
69
-		return $this->addToPropertyCtrl("class", "empty",array("empty"));
69
+		return $this->addToPropertyCtrl("class", "empty", array("empty"));
70 70
 	}
71 71
 
72 72
 	public function setBasic() {
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	public function addEmphasisImage($src, $alt="", $before=true) {
84 84
 		$this->addToProperty("class", "image");
85
-		return $this->addImage($src,$alt,$before);
85
+		return $this->addImage($src, $alt, $before);
86 86
 	}
87 87
 
88 88
 	/**
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 * @return HtmlImg
94 94
 	 */
95 95
 	public function addAvatarImage($src, $alt="", $before=true) {
96
-		$img=$this->addImage($src,$alt,$before);
96
+		$img=$this->addImage($src, $alt, $before);
97 97
 		$img->setClass("ui image");
98 98
 		$img->asAvatar();
99 99
 		return $img;
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	* @return HtmlImg
108 108
 	*/
109 109
 	public function addImage($src, $alt="", $before=true) {
110
-		$img=new HtmlImg("image-" . $this->identifier, $src, $alt);
110
+		$img=new HtmlImg("image-".$this->identifier, $src, $alt);
111 111
 		$img->setClass("");
112 112
 		$this->addContent($img, $before);
113 113
 		return $img;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 * @return HtmlDoubleElement
120 120
 	 */
121 121
 	public function addDetail($detail) {
122
-		$div=new HtmlSemDoubleElement("detail-" . $this->identifier, $this->tagName,"detail");
122
+		$div=new HtmlSemDoubleElement("detail-".$this->identifier, $this->tagName, "detail");
123 123
 		$div->setContent($detail);
124 124
 		$this->addContent($div);
125 125
 		return $div;
@@ -130,14 +130,14 @@  discard block
 block discarded – undo
130 130
 	 * @return HtmlLabel
131 131
 	 */
132 132
 	public function asRibbon($direction=Direction::NONE) {
133
-		return $this->addToPropertyCtrl("class", $direction." ribbon", array ("ribbon","right ribbon","left ribbon" ));
133
+		return $this->addToPropertyCtrl("class", $direction." ribbon", array("ribbon", "right ribbon", "left ribbon"));
134 134
 	}
135 135
 
136
-	public function setAttached($side=Side::TOP,$direction=Direction::NONE){
137
-		if($direction!==Direction::NONE)
138
-			return $this->addToPropertyCtrl("class", $side." ".$direction." attached",Side::getConstantValues($direction." attached"));
136
+	public function setAttached($side=Side::TOP, $direction=Direction::NONE) {
137
+		if ($direction!==Direction::NONE)
138
+			return $this->addToPropertyCtrl("class", $side." ".$direction." attached", Side::getConstantValues($direction." attached"));
139 139
 		else
140
-			return $this->addToPropertyCtrl("class", $side." attached",Side::getConstantValues("attached"));
140
+			return $this->addToPropertyCtrl("class", $side." attached", Side::getConstantValues("attached"));
141 141
 	}
142 142
 
143 143
 	/**
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 * @param string $direction one of RIGHT="right", LEFT="left",DOWN="down",UP="up",NONE="",BELOW="below"
147 147
 	 * @return HtmlLabel
148 148
 	 */
149
-	public static function ribbon($identifier, $caption,$direction=Direction::NONE) {
149
+	public static function ribbon($identifier, $caption, $direction=Direction::NONE) {
150 150
 		return (new HtmlLabel($identifier, $caption))->asRibbon($direction);
151 151
 	}
152 152
 
Please login to merge, or discard this patch.
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -23,8 +23,9 @@  discard block
 block discarded – undo
23 23
 	public function __construct($identifier, $caption="", $icon=NULL, $tagName="div") {
24 24
 		parent::__construct($identifier, $tagName, "ui label");
25 25
 		$this->content=$caption;
26
-		if (isset($icon))
27
-			$this->addIcon($icon);
26
+		if (isset($icon)) {
27
+					$this->addIcon($icon);
28
+		}
28 29
 	}
29 30
 
30 31
 	/**
@@ -33,10 +34,11 @@  discard block
 block discarded – undo
33 34
 	 * @return HtmlLabel
34 35
 	 */
35 36
 	public function setPointing($value=Direction::NONE) {
36
-		if($value==="left" || $value==="right")
37
-			return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing"));
38
-		else
39
-			return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing",true));
37
+		if($value==="left" || $value==="right") {
38
+					return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing"));
39
+		} else {
40
+					return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing",true));
41
+		}
40 42
 	}
41 43
 
42 44
 	/**
@@ -134,10 +136,11 @@  discard block
 block discarded – undo
134 136
 	}
135 137
 
136 138
 	public function setAttached($side=Side::TOP,$direction=Direction::NONE){
137
-		if($direction!==Direction::NONE)
138
-			return $this->addToPropertyCtrl("class", $side." ".$direction." attached",Side::getConstantValues($direction." attached"));
139
-		else
140
-			return $this->addToPropertyCtrl("class", $side." attached",Side::getConstantValues("attached"));
139
+		if($direction!==Direction::NONE) {
140
+					return $this->addToPropertyCtrl("class", $side." ".$direction." attached",Side::getConstantValues($direction." attached"));
141
+		} else {
142
+					return $this->addToPropertyCtrl("class", $side." attached",Side::getConstantValues("attached"));
143
+		}
141 144
 	}
142 145
 
143 146
 	/**
Please login to merge, or discard this patch.