Completed
Push — master ( fcfed5...b7a7dd )
by Jean-Christophe
03:28
created
Ajax/semantic/html/content/view/HtmlItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,6 +6,6 @@
 block discarded – undo
6 6
 class HtmlItem extends HtmlViewItem {
7 7
 
8 8
 	public function __construct($identifier) {
9
-		parent::__construct($identifier, "item", array ());
9
+		parent::__construct($identifier, "item", array());
10 10
 	}
11 11
 }
12 12
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/content/view/HtmlViewGroups.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 abstract class HtmlViewGroups extends HtmlSemCollection {
10 10
 
11
-	public function __construct($identifier, $uiClass,$items=array()) {
11
+	public function __construct($identifier, $uiClass, $items=array()) {
12 12
 		parent::__construct($identifier, "div", $uiClass);
13 13
 		$this->addItems($items);
14 14
 	}
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 * @param int $wide
41 41
 	 */
42 42
 	public function setWide($wide) {
43
-		$wide=Wide::getConstants()["W" . $wide];
43
+		$wide=Wide::getConstants()["W".$wide];
44 44
 		return $this->addToPropertyCtrl("class", $wide, Wide::getConstants());
45 45
 	}
46 46
 
Please login to merge, or discard this patch.
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.
Ajax/semantic/html/content/view/HtmlViewItem.php 2 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -18,20 +18,20 @@  discard block
 block discarded – undo
18 18
 
19 19
 	protected $_sortContentBy=[];
20 20
 
21
-	public function __construct($identifier,$baseClass,$content=[]) {
21
+	public function __construct($identifier, $baseClass, $content=[]) {
22 22
 		parent::__construct($identifier, "div", $baseClass, $content);
23 23
 	}
24 24
 
25 25
 	private function createContent($content, $baseClass="content") {
26 26
 		$count=\sizeof($this->content);
27
-		$result=new HtmlViewContent("content-" . $count . "-" . $this->identifier, $content);
27
+		$result=new HtmlViewContent("content-".$count."-".$this->identifier, $content);
28 28
 		$result->setClass($baseClass);
29 29
 		return $result;
30 30
 	}
31 31
 
32 32
 	private function addElementInContent($key, $element) {
33
-		if (\array_key_exists($key, $this->content) === false) {
34
-			$this->content[$key]=array ();
33
+		if (\array_key_exists($key, $this->content)===false) {
34
+			$this->content[$key]=array();
35 35
 		}
36 36
 		$this->content[$key][]=$element;
37 37
 		return $element;
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
 
49 49
 	public function addHeader($header, $niveau=4, $type="page") {
50 50
 		if (!$header instanceof HtmlHeader) {
51
-			$header=new HtmlHeader("header-" . $this->identifier, $niveau, $header, $type);
51
+			$header=new HtmlHeader("header-".$this->identifier, $niveau, $header, $type);
52 52
 		}
53 53
 		$this->content["header"]=$this->createContent($header);
54 54
 	}
55 55
 
56 56
 	public function addImage($image, $title="") {
57 57
 		if (!$image instanceof HtmlImage) {
58
-			$image=new HtmlImage("image-" . $this->identifier, $image, $title);
58
+			$image=new HtmlImage("image-".$this->identifier, $image, $title);
59 59
 		}
60 60
 		$image->setClass("ui image");
61 61
 		return $this->addElementInContent("content", $image);
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	public function addReveal($visibleContent, $hiddenContent=NULL, $type=RevealType::FADE, $attributeType=NULL) {
65 65
 		$reveal=$visibleContent;
66 66
 		if (!$visibleContent instanceof HtmlReveal) {
67
-			$reveal=new HtmlReveal("reveral-" . $this->identifier, $visibleContent, $hiddenContent, $type, $attributeType);
67
+			$reveal=new HtmlReveal("reveral-".$this->identifier, $visibleContent, $hiddenContent, $type, $attributeType);
68 68
 		}
69 69
 		return $this->addElementInContent("content", $reveal);
70 70
 	}
@@ -93,22 +93,22 @@  discard block
 block discarded – undo
93 93
 	 * @param boolean $asIcons
94 94
 	 * @return \Ajax\semantic\html\elements\HtmlButtonGroups
95 95
 	 */
96
-	public function addButtons($elements=array(), $asIcons=false){
97
-		$buttons=new HtmlButtonGroups("buttons-".$this->identifier,$elements,$asIcons);
96
+	public function addButtons($elements=array(), $asIcons=false) {
97
+		$buttons=new HtmlButtonGroups("buttons-".$this->identifier, $elements, $asIcons);
98 98
 		$this->addElementInContent("content", $buttons);
99 99
 		return $buttons;
100 100
 	}
101 101
 
102 102
 
103 103
 
104
-	public function addItemHeaderContent($header, $metas=array(), $description=NULL,$extra=NULL) {
104
+	public function addItemHeaderContent($header, $metas=array(), $description=NULL, $extra=NULL) {
105 105
 		$count=\sizeof($this->content);
106
-		return $this->addElementInContent("content", new HtmlViewHeaderContent("content-" . $count . "-" . $this->identifier, $header, $metas, $description,$extra));
106
+		return $this->addElementInContent("content", new HtmlViewHeaderContent("content-".$count."-".$this->identifier, $header, $metas, $description, $extra));
107 107
 	}
108 108
 
109 109
 	public function addItemContent($content=array()) {
110 110
 		$count=\sizeof($this->content);
111
-		return $this->addElementInContent("content", new HtmlViewContent("content-" . $count . "-" . $this->identifier, $content));
111
+		return $this->addElementInContent("content", new HtmlViewContent("content-".$count."-".$this->identifier, $content));
112 112
 	}
113 113
 
114 114
 	public function getItemContent($index=NULL) {
@@ -134,13 +134,13 @@  discard block
 block discarded – undo
134 134
 	 * @see HtmlSemDoubleElement::compile()
135 135
 	 */
136 136
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
137
-		$this->content=JArray::sortAssociative($this->content, [ "header","image","content","extra-content" ]);
137
+		$this->content=JArray::sortAssociative($this->content, ["header", "image", "content", "extra-content"]);
138 138
 		return parent::compile($js, $view);
139 139
 	}
140 140
 
141
-	public function asLink($href="",$target=NULL) {
141
+	public function asLink($href="", $target=NULL) {
142 142
 		$this->addToProperty("class", "link");
143
-		if ($href !== "") {
143
+		if ($href!=="") {
144 144
 			$this->setProperty("href", $href);
145 145
 			if (isset($target))
146 146
 				$this->setProperty("target", $target);
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,8 +37,9 @@  discard block
 block discarded – undo
37 37
 
38 38
 	private function getPart($part, $index=NULL) {
39 39
 		if (\array_key_exists($part, $this->content)) {
40
-			if (isset($index))
41
-				return $this->content[$part][$index];
40
+			if (isset($index)) {
41
+							return $this->content[$part][$index];
42
+			}
42 43
 			return $this->content[$part];
43 44
 		}
44 45
 		return NULL;
@@ -140,8 +141,9 @@  discard block
 block discarded – undo
140 141
 		$this->addToProperty("class", "link");
141 142
 		if ($href !== "") {
142 143
 			$this->setProperty("href", $href);
143
-			if (isset($target))
144
-				$this->setProperty("target", $target);
144
+			if (isset($target)) {
145
+							$this->setProperty("target", $target);
146
+			}
145 147
 		}
146 148
 		return $this;
147 149
 	}
Please login to merge, or discard this patch.