Completed
Push — master ( fcfed5...b7a7dd )
by Jean-Christophe
03:28
created
Ajax/semantic/html/views/HtmlCard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,6 +7,6 @@
 block discarded – undo
7 7
 class HtmlCard extends HtmlViewItem {
8 8
 
9 9
 	public function __construct($identifier) {
10
-		parent::__construct($identifier, "ui card", array ());
10
+		parent::__construct($identifier, "ui card", array());
11 11
 	}
12 12
 }
13 13
\ No newline at end of file
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=array()) {
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/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/HtmlViewContent.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,16 +15,16 @@  discard block
 block discarded – undo
15 15
 
16 16
 	private function addElement($content, $baseClass) {
17 17
 		$count=\sizeof($this->content);
18
-		$result=new HtmlSemDoubleElement("element-" . $count . "-" . $this->identifier, "div", $baseClass, $content);
18
+		$result=new HtmlSemDoubleElement("element-".$count."-".$this->identifier, "div", $baseClass, $content);
19 19
 		$this->addContent($result);
20 20
 		return $result;
21 21
 	}
22 22
 
23 23
 	public function addMeta($value, $direction=Direction::LEFT) {
24
-		if (\array_key_exists("meta", $this->content) === false) {
25
-			$this->content["meta"]=new HtmlSemDoubleElement("meta-" . $this->identifier, "div", "meta", array ());
24
+		if (\array_key_exists("meta", $this->content)===false) {
25
+			$this->content["meta"]=new HtmlSemDoubleElement("meta-".$this->identifier, "div", "meta", array());
26 26
 		}
27
-		if ($direction === Direction::RIGHT) {
27
+		if ($direction===Direction::RIGHT) {
28 28
 			$value=new HtmlSemDoubleElement("", "span", "", $value);
29 29
 			$value->setFloated($direction);
30 30
 		}
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
 	public function addMetas($metas) {
44 44
 		if (\is_array($metas)) {
45
-			foreach ( $metas as $meta ) {
45
+			foreach ($metas as $meta) {
46 46
 				$this->addMeta($meta);
47 47
 			}
48 48
 		} else
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	}
52 52
 
53 53
 	public function addContentIcon($icon, $caption=NULL, $direction=Direction::LEFT) {
54
-		if ($direction === Direction::RIGHT) {
54
+		if ($direction===Direction::RIGHT) {
55 55
 			if (isset($caption)) {
56 56
 				$result=new HtmlSemDoubleElement("", "span", "", $caption);
57 57
 				$result->addIcon($icon);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	}
70 70
 
71 71
 	public function addContentText($caption, $direction=Direction::LEFT) {
72
-		if ($direction === Direction::RIGHT) {
72
+		if ($direction===Direction::RIGHT) {
73 73
 			$result=new HtmlSemDoubleElement("", "span", "", $caption);
74 74
 			$this->addContent($result);
75 75
 			$result->setFloated($direction);
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	}
80 80
 
81 81
 	public function addContentIcons($icons, $direction=Direction::LEFT) {
82
-		foreach ( $icons as $icon ) {
82
+		foreach ($icons as $icon) {
83 83
 			$this->addContentIcon($icon, NULL, $direction);
84 84
 		}
85 85
 		return $this;
Please login to merge, or discard this patch.
Ajax/semantic/html/content/view/HtmlViewHeaderContent.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@  discard block
 block discarded – undo
9 9
 
10 10
 class HtmlViewHeaderContent extends HtmlViewContent {
11 11
 
12
-	public function __construct($identifier, $header=NULL, $metas=array(), $description=NULL,$extra=null) {
13
-		parent::__construct($identifier, array ());
12
+	public function __construct($identifier, $header=NULL, $metas=array(), $description=NULL, $extra=null) {
13
+		parent::__construct($identifier, array());
14 14
 		if (isset($header)) {
15 15
 			$this->setHeader($header);
16 16
 		}
@@ -24,15 +24,15 @@  discard block
 block discarded – undo
24 24
 	}
25 25
 
26 26
 	public function setDescription($value) {
27
-		$this->content["description"]=new HtmlSemDoubleElement("description-" . $this->identifier, "div", "description", $value);
27
+		$this->content["description"]=new HtmlSemDoubleElement("description-".$this->identifier, "div", "description", $value);
28 28
 	}
29 29
 
30 30
 	public function setHeader($value) {
31
-		$this->content["header"]=new HtmlSemDoubleElement("header-" . $this->identifier, "a", "header", $value);
31
+		$this->content["header"]=new HtmlSemDoubleElement("header-".$this->identifier, "a", "header", $value);
32 32
 	}
33 33
 
34 34
 	public function setExtra($value) {
35
-		$this->content["extra"]=new HtmlSemDoubleElement("extra-" . $this->identifier, "a", "extra", $value);
35
+		$this->content["extra"]=new HtmlSemDoubleElement("extra-".$this->identifier, "a", "extra", $value);
36 36
 	}
37 37
 
38 38
 	/**
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
43 43
 	 */
44 44
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
45
-		$this->content=JArray::sortAssociative($this->content, [ "image","header","meta","description","extra" ]);
45
+		$this->content=JArray::sortAssociative($this->content, ["image", "header", "meta", "description", "extra"]);
46 46
 		return parent::compile($js, $view);
47 47
 	}
48 48
 }
49 49
\ No newline at end of file
Please login to merge, or discard this patch.
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 1 patch
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.
Ajax/semantic/html/content/view/HtmlViewItem.php 1 patch
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.