Completed
Push — master ( c6edab...f99fed )
by Jean-Christophe
03:30
created
Ajax/semantic/html/content/HtmlAccordionMenuItem.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 
5 5
 
6 6
 class HtmlAccordionMenuItem extends HtmlMenuItem {
7
-	public function __construct($identifier,$title,$content) {
8
-		parent::__construct($identifier, new HtmlAccordionItem("accordion-".$identifier, $title,$content));
7
+	public function __construct($identifier, $title, $content) {
8
+		parent::__construct($identifier, new HtmlAccordionItem("accordion-".$identifier, $title, $content));
9 9
 	}
10 10
 
11
-	public function setActive($value=true){
11
+	public function setActive($value=true) {
12 12
 		$this->content->setActive($value);
13 13
 		return $this;
14 14
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlAccordionItem.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,30 +20,30 @@
 block discarded – undo
20 20
 		$this->_title=$title;
21 21
 	}
22 22
 
23
-	public function setTitle($title){
23
+	public function setTitle($title) {
24 24
 		$this->_title=$title;
25 25
 	}
26 26
 
27
-	public function setIcon($icon){
27
+	public function setIcon($icon) {
28 28
 		$this->_icon=$icon;
29 29
 	}
30 30
 
31
-	protected function createTitleElement(){
32
-		$element=new HtmlSemDoubleElement("title-".$this->identifier,"div","title");
33
-		$element->setContent(array(new HtmlIcon("", $this->_icon),$this->_title));
34
-		if($this->_active===true)
31
+	protected function createTitleElement() {
32
+		$element=new HtmlSemDoubleElement("title-".$this->identifier, "div", "title");
33
+		$element->setContent(array(new HtmlIcon("", $this->_icon), $this->_title));
34
+		if ($this->_active===true)
35 35
 			$element->addToProperty("class", "active");
36 36
 		return $element;
37 37
 	}
38 38
 
39
-	public function compile(JsUtils $js=NULL, &$view=NULL){
39
+	public function compile(JsUtils $js=NULL, &$view=NULL) {
40 40
 		$this->titleElement=$this->createTitleElement();
41
-		return parent::compile($js,$view);
41
+		return parent::compile($js, $view);
42 42
 	}
43 43
 
44
-	public function setActive($value=true){
44
+	public function setActive($value=true) {
45 45
 		$this->_active=$value;
46
-		if($value===true)
46
+		if ($value===true)
47 47
 			$this->addToPropertyCtrl("class", "active", array("active"));
48 48
 		else
49 49
 			$this->removePropertyValue("class", "active");
Please login to merge, or discard this patch.
Ajax/semantic/html/content/card/HtmlCardContent.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/card/HtmlCardHeaderContent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 class HtmlCardHeaderContent extends HtmlCardContent {
11 11
 
12 12
 	public function __construct($identifier, $header=NULL, $metas=array(), $description=NULL) {
13
-		parent::__construct($identifier, array ());
13
+		parent::__construct($identifier, array());
14 14
 		if (isset($header)) {
15 15
 			$this->setHeader($header);
16 16
 		}
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
 	}
22 22
 
23 23
 	public function setDescription($value) {
24
-		$this->content["description"]=new HtmlSemDoubleElement("description-" . $this->identifier, "div", "description", $value);
24
+		$this->content["description"]=new HtmlSemDoubleElement("description-".$this->identifier, "div", "description", $value);
25 25
 	}
26 26
 
27 27
 	public function setHeader($value) {
28
-		$this->content["header"]=new HtmlSemDoubleElement("header-" . $this->identifier, "a", "header", $value);
28
+		$this->content["header"]=new HtmlSemDoubleElement("header-".$this->identifier, "a", "header", $value);
29 29
 	}
30 30
 
31 31
 	/**
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
36 36
 	 */
37 37
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
38
-		$this->content=JArray::sortAssociative($this->content, [ "image","header","meta","description" ]);
38
+		$this->content=JArray::sortAssociative($this->content, ["image", "header", "meta", "description"]);
39 39
 		return parent::compile($js, $view);
40 40
 	}
41 41
 }
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/content/table/HtmlTD.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 use Ajax\semantic\html\elements\html5\HtmlLink;
11 11
 
12 12
 class HtmlTD extends HtmlSemDoubleElement {
13
-	use TextAlignmentTrait,TableElementTrait;
13
+	use TextAlignmentTrait, TableElementTrait;
14 14
 	private $_container;
15 15
 	private $_row;
16 16
 	private $_col;
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 	 */
24 24
 	public function __construct($identifier, $content=NULL, $tagName="td") {
25 25
 		parent::__construct($identifier, $tagName, "", $content);
26
-		$this->_variations=[ Variation::COLLAPSING ];
27
-		$this->_states=[ State::ACTIVE,State::POSITIVE,State::NEGATIVE,State::WARNING,State::ERROR,State::DISABLED ];
26
+		$this->_variations=[Variation::COLLAPSING];
27
+		$this->_states=[State::ACTIVE, State::POSITIVE, State::NEGATIVE, State::WARNING, State::ERROR, State::DISABLED];
28 28
 	}
29 29
 
30 30
 	public function setContainer($container, $row, $col) {
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 	}
40 40
 
41 41
 	public function setRowspan($rowspan) {
42
-		$to=min($this->_container->count(), $this->_row + $rowspan - 1);
43
-		for($i=$to; $i > $this->_row; $i--) {
42
+		$to=min($this->_container->count(), $this->_row+$rowspan-1);
43
+		for ($i=$to; $i>$this->_row; $i--) {
44 44
 			$this->_container->delete($i, $this->_col);
45 45
 		}
46 46
 		$this->setProperty("rowspan", $rowspan);
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
 	}
57 57
 
58 58
 	public function setColspan($colspan) {
59
-		$to=min($this->_container->getRow($this->_row)->count(), $this->_col + $colspan - 1);
60
-		for($i=$to; $i > $this->_col; $i--) {
61
-			$this->_container->delete($this->_row, $this->_col + 1);
59
+		$to=min($this->_container->getRow($this->_row)->count(), $this->_col+$colspan-1);
60
+		for ($i=$to; $i>$this->_col; $i--) {
61
+			$this->_container->delete($this->_row, $this->_col+1);
62 62
 		}
63 63
 		$this->setProperty("colspan", $colspan);
64 64
 		return $this->_container;
Please login to merge, or discard this patch.
Ajax/semantic/html/views/HtmlCardGroups.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	}
15 15
 
16 16
 	protected function createItem($value) {
17
-		$result=new HtmlCard("card-" . $this->count());
17
+		$result=new HtmlCard("card-".$this->count());
18 18
 		if (\is_array($value)) {
19 19
 			$header=JArray::getValue($value, "header", 0);
20 20
 			$metas=JArray::getValue($value, "metas", 1);
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	 * @param int $wide
39 39
 	 */
40 40
 	public function setWide($wide) {
41
-		$wide=Wide::getConstants()["W" . $wide];
41
+		$wide=Wide::getConstants()["W".$wide];
42 42
 		return $this->addToPropertyCtrl("class", $wide, Wide::getConstants());
43 43
 	}
44 44
 
Please login to merge, or discard this patch.
Ajax/Bootstrap.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
 	 * @param string $tagName container tagName
177 177
 	 * @return HtmlListgroup
178 178
 	 */
179
-	public function htmlListgroup($identifier,$items=array(),$tagName="ul"){
180
-		$listGroup=new HtmlListgroup($identifier,$tagName);
179
+	public function htmlListgroup($identifier, $items=array(), $tagName="ul") {
180
+		$listGroup=new HtmlListgroup($identifier, $tagName);
181 181
 		$listGroup->addItems($items);
182 182
 		return $this->addHtmlComponent($listGroup);
183 183
 	}
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
 	 * @param string $onClick
203 203
 	 * @return HtmlSplitbutton
204 204
 	 */
205
-	public function htmlSplitbutton($identifier,$value="", $items=array(), $cssStyle="btn-default", $onClick=NULL) {
206
-		return $this->addHtmlComponent(new HtmlSplitbutton($identifier, $value, $items, $cssStyle,$onClick));
205
+	public function htmlSplitbutton($identifier, $value="", $items=array(), $cssStyle="btn-default", $onClick=NULL) {
206
+		return $this->addHtmlComponent(new HtmlSplitbutton($identifier, $value, $items, $cssStyle, $onClick));
207 207
 	}
208 208
 
209 209
 	/**
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	 * @param string $identifier
212 212
 	 * @return HtmlInputgroup
213 213
 	 */
214
-	public function htmlInputgroup($identifier){
214
+	public function htmlInputgroup($identifier) {
215 215
 		return $this->addHtmlComponent(new HtmlInputgroup($identifier));
216 216
 	}
217 217
 
@@ -223,8 +223,8 @@  discard block
 block discarded – undo
223 223
 	 * @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()}
224 224
 	 * @return HtmlBreadcrumbs
225 225
 	 */
226
-	public function htmlBreadcrumbs($identifier,$elements=array(),$autoActive=true,$startIndex=0,$hrefFunction=NULL){
227
-		return $this->addHtmlComponent(new HtmlBreadcrumbs($identifier,$elements,$autoActive,$startIndex,$hrefFunction));
226
+	public function htmlBreadcrumbs($identifier, $elements=array(), $autoActive=true, $startIndex=0, $hrefFunction=NULL) {
227
+		return $this->addHtmlComponent(new HtmlBreadcrumbs($identifier, $elements, $autoActive, $startIndex, $hrefFunction));
228 228
 	}
229 229
 
230 230
 	/**
@@ -236,8 +236,8 @@  discard block
 block discarded – undo
236 236
 	 * @param int $active The active page
237 237
 	 * @return HtmlPagination
238 238
 	 */
239
-	public function htmlPagination($identifier,$from=1,$to=1,$active=NULL,$countVisible=NULL){
240
-		return $this->addHtmlComponent(new HtmlPagination($identifier,$from,$to,$active,$countVisible));
239
+	public function htmlPagination($identifier, $from=1, $to=1, $active=NULL, $countVisible=NULL) {
240
+		return $this->addHtmlComponent(new HtmlPagination($identifier, $from, $to, $active, $countVisible));
241 241
 	}
242 242
 
243 243
 	/**
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 	 * @param int $numCols
249 249
 	 * @return HtmlGridSystem
250 250
 	 */
251
-	public function htmlGridSystem($identifier,$numRows=1,$numCols=NULL){
252
-		return $this->addHtmlComponent(new HtmlGridSystem($identifier,$numRows,$numCols));
251
+	public function htmlGridSystem($identifier, $numRows=1, $numCols=NULL) {
252
+		return $this->addHtmlComponent(new HtmlGridSystem($identifier, $numRows, $numCols));
253 253
 	}
254 254
 }
255 255
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/bootstrap/components/Tabs.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 	public function __construct(JsUtils $js) {
21 21
 		parent::__construct($js);
22
-		$this->tabs=array ();
22
+		$this->tabs=array();
23 23
 	}
24 24
 
25 25
 	public function getTabs() {
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	}
37 37
 
38 38
 	public function getTab($index) {
39
-		if ($index>0&&$index<sizeof($this->tabs))
39
+		if ($index>0 && $index<sizeof($this->tabs))
40 40
 			return $this->tabs [$index];
41 41
 	}
42 42
 
Please login to merge, or discard this patch.
Ajax/bootstrap/components/Collapse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 	}
66 66
 
67 67
 	protected function compileEvents() {
68
-		foreach ( $this->events as $event => $jsCode ) {
68
+		foreach ($this->events as $event => $jsCode) {
69 69
 			$this->jquery_code_for_compile []="$( \"".$this->collapsed."\" ).on(\"".$event."\" , function (e) {".$jsCode."});";
70 70
 		}
71 71
 	}
Please login to merge, or discard this patch.