Completed
Push — master ( 69e9f4...3042e6 )
by Jean-Christophe
04:01
created
Ajax/semantic/html/collections/HtmlTable.php 1 patch
Doc Comments   +9 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,6 +17,11 @@  discard block
 block discarded – undo
17 17
 class HtmlTable extends HtmlSemDoubleElement {
18 18
 	private $_colCount;
19 19
 
20
+	/**
21
+	 * @param string $identifier
22
+	 * @param integer $rowCount
23
+	 * @param integer $colCount
24
+	 */
20 25
 	public function __construct($identifier, $rowCount, $colCount) {
21 26
 		parent::__construct($identifier, "table", "ui table");
22 27
 		$this->content=array ();
@@ -96,7 +101,7 @@  discard block
 block discarded – undo
96 101
 	/**
97 102
 	 * Retuns the row at $rowIndex
98 103
 	 * @param int $rowIndex
99
-	 * @return \Ajax\semantic\html\content\HtmlTR
104
+	 * @return \Ajax\common\html\HtmlDoubleElement
100 105
 	 */
101 106
 	public function getRow($rowIndex) {
102 107
 		return $this->getBody()->getRow($rowIndex);
@@ -172,6 +177,9 @@  discard block
 block discarded – undo
172 177
 		return $this->colAlign($colIndex, "colLeft");
173 178
 	}
174 179
 
180
+	/**
181
+	 * @param string $function
182
+	 */
175 183
 	private function colAlign($colIndex, $function) {
176 184
 		if (\is_array($colIndex)) {
177 185
 			foreach ( $colIndex as $cIndex ) {
Please login to merge, or discard this patch.
Ajax/semantic/traits/SemanticComponentsTrait.php 1 patch
Doc Comments   +15 added lines patch added patch discarded remove patch
@@ -58,6 +58,9 @@  discard block
 block discarded – undo
58 58
 		return $this->addComponent(new Accordion($this->js), $attachTo, $params);
59 59
 	}
60 60
 
61
+	/**
62
+	 * @param string $attachTo
63
+	 */
61 64
 	public function sticky($attachTo=NULL, $params=NULL) {
62 65
 		return $this->addComponent(new Sticky($this->js), $attachTo, $params);
63 66
 	}
@@ -66,18 +69,30 @@  discard block
 block discarded – undo
66 69
 		return $this->addComponent(new Checkbox($this->js), $attachTo, $params);
67 70
 	}
68 71
 
72
+	/**
73
+	 * @param string $attachTo
74
+	 */
69 75
 	public function rating($attachTo=NULL, $params=NULL) {
70 76
 		return $this->addComponent(new Rating($this->js), $attachTo, $params);
71 77
 	}
72 78
 
79
+	/**
80
+	 * @param string $attachTo
81
+	 */
73 82
 	public function progress($attachTo=NULL, $params=NULL) {
74 83
 		return $this->addComponent(new Progress($this->js), $attachTo, $params);
75 84
 	}
76 85
 
86
+	/**
87
+	 * @param string $attachTo
88
+	 */
77 89
 	public function search($attachTo=NULL, $params=NULL) {
78 90
 		return $this->addComponent(new Search($this->js), $attachTo, $params);
79 91
 	}
80 92
 
93
+	/**
94
+	 * @param string $attachTo
95
+	 */
81 96
 	public function dimmer($attachTo=NULL, $params=NULL) {
82 97
 		return $this->addComponent(new Dimmer($this->js), $attachTo, $params);
83 98
 	}
Please login to merge, or discard this patch.
Ajax/semantic/traits/SemanticHtmlElementsTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,11 +100,11 @@
 block discarded – undo
100 100
 	public function htmlIconGroups($identifier, $size="", $icons=array()) {
101 101
 		$group=new HtmlIconGroups($identifier, $size);
102 102
 		if (JArray::isAssociative($icons)) {
103
-			foreach ( $icons as $icon => $size ) {
103
+			foreach ($icons as $icon => $size) {
104 104
 				$group->add($icon, $size);
105 105
 			}
106
-		} else {
107
-			foreach ( $icons as $icon ) {
106
+		}else {
107
+			foreach ($icons as $icon) {
108 108
 				$group->add($icon);
109 109
 			}
110 110
 		}
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlDimmer.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 class HtmlDimmer extends HtmlSemDoubleElement {
11 11
 	private $_container;
12
-	private $_params=array ();
12
+	private $_params=array();
13 13
 	private $_inverted;
14 14
 
15 15
 	public function __construct($identifier, $content=NULL) {
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
 	}
20 20
 
21 21
 	public function setContent($content) {
22
-		$this->content=new HtmlSemDoubleElement("content-" . $this->identifier, "div", "content", new HtmlSemDoubleElement("", "div", "center", $content));
22
+		$this->content=new HtmlSemDoubleElement("content-".$this->identifier, "div", "content", new HtmlSemDoubleElement("", "div", "center", $content));
23 23
 		return $this;
24 24
 	}
25 25
 
26 26
 	public function asIcon($icon, $title, $subHeader=NULL) {
27
-		$header=new HtmlHeader("header-" . $this->identifier);
27
+		$header=new HtmlHeader("header-".$this->identifier);
28 28
 		$header->asIcon($icon, $title, $subHeader);
29
-		if ($this->_inverted === false)
29
+		if ($this->_inverted===false)
30 30
 			$header->setInverted();
31 31
 		return $this->setContent($header);
32 32
 	}
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 
44 44
 	public function run(JsUtils $js) {
45 45
 		if ($this->_container instanceof HtmlSingleElement)
46
-			$this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params);
46
+			$this->_bsComponent=$js->semantic()->dimmer("#".$this->_container->getIdentifier(), $this->_params);
47 47
 		return parent::run($js);
48 48
 	}
49 49
 
50 50
 	public function jsShow() {
51
-		if (isset($this->_container) === true)
52
-			return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");';
51
+		if (isset($this->_container)===true)
52
+			return '$("#.'.$this->_container->getIdentifier().').dimmer("show");';
53 53
 	}
54 54
 
55 55
 	public function setBlurring() {
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,8 +26,9 @@  discard block
 block discarded – undo
26 26
 	public function asIcon($icon, $title, $subHeader=NULL) {
27 27
 		$header=new HtmlHeader("header-" . $this->identifier);
28 28
 		$header->asIcon($icon, $title, $subHeader);
29
-		if ($this->_inverted === false)
30
-			$header->setInverted();
29
+		if ($this->_inverted === false) {
30
+					$header->setInverted();
31
+		}
31 32
 		return $this->setContent($header);
32 33
 	}
33 34
 
@@ -42,14 +43,16 @@  discard block
 block discarded – undo
42 43
 	}
43 44
 
44 45
 	public function run(JsUtils $js) {
45
-		if ($this->_container instanceof HtmlSingleElement)
46
-			$this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params);
46
+		if ($this->_container instanceof HtmlSingleElement) {
47
+					$this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params);
48
+		}
47 49
 		return parent::run($js);
48 50
 	}
49 51
 
50 52
 	public function jsShow() {
51
-		if (isset($this->_container) === true)
52
-			return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");';
53
+		if (isset($this->_container) === true) {
54
+					return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");';
55
+		}
53 56
 	}
54 57
 
55 58
 	public function setBlurring() {
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlSearch.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
8 8
 use Ajax\semantic\html\base\constants\Direction;
9 9
 
10 10
 class HtmlSearch extends HtmlSemDoubleElement {
11
-	private $_elements=array ();
12
-	private $_params=array ();
13
-	private $_searchFields=array ("title" );
11
+	private $_elements=array();
12
+	private $_params=array();
13
+	private $_searchFields=array("title");
14 14
 	private $_local=false;
15 15
 
16 16
 	public function __construct($identifier, $placeholder=NULL, $icon=NULL) {
17
-		parent::__construct("search-" . $identifier, "div", "ui search", array ());
17
+		parent::__construct("search-".$identifier, "div", "ui search", array());
18 18
 		$this->createField($placeholder, $icon);
19 19
 		$this->createResult();
20 20
 		$this->_params["type"]="standard";
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 
23 23
 	private function createField($placeholder=NULL, $icon=NULL) {
24 24
 		$field=new HtmlInput($this->identifier);
25
-		if (isset($placeholder) === true)
25
+		if (isset($placeholder)===true)
26 26
 			$field->setPlaceholder($placeholder);
27
-		if (isset($icon) === true)
27
+		if (isset($icon)===true)
28 28
 			$field->addIcon($icon, Direction::RIGHT);
29 29
 		$field->getField()->setClass("prompt");
30 30
 		$this->content["field"]=$field;
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	}
33 33
 
34 34
 	private function createResult() {
35
-		$this->content["result"]=new HtmlSemDoubleElement("results-" . $this->identifier, "div", "results");
35
+		$this->content["result"]=new HtmlSemDoubleElement("results-".$this->identifier, "div", "results");
36 36
 		return $this->content["result"];
37 37
 	}
38 38
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	}
50 50
 
51 51
 	public function setUrl($url) {
52
-		$this->_params["apiSettings"]="%{url: %quote%" . $url . "%quote%}%";
52
+		$this->_params["apiSettings"]="%{url: %quote%".$url."%quote%}%";
53 53
 		return $this;
54 54
 	}
55 55
 
@@ -72,16 +72,16 @@  discard block
 block discarded – undo
72 72
 	}
73 73
 
74 74
 	public function run(JsUtils $js) {
75
-		$this->_params["onSelect"]='%function(result,response){$(%quote%#' . $this->identifier . '%quote%).trigger(%quote%onSelect%quote%, {%quote%result%quote%: result, %quote%response%quote%:response} );}%';
75
+		$this->_params["onSelect"]='%function(result,response){$(%quote%#'.$this->identifier.'%quote%).trigger(%quote%onSelect%quote%, {%quote%result%quote%: result, %quote%response%quote%:response} );}%';
76 76
 		$searchFields=\json_encode($this->_searchFields);
77 77
 		$searchFields=str_ireplace("\"", "%quote%", $searchFields);
78
-		$this->_params["searchFields"]="%" . $searchFields . "%";
79
-		if ($this->_local === true) {
78
+		$this->_params["searchFields"]="%".$searchFields."%";
79
+		if ($this->_local===true) {
80 80
 			$this->_params["source"]="%content%";
81
-			$this->addEvent("beforeExecute", "var content=" . $this->resultsToJson() . ";");
81
+			$this->addEvent("beforeExecute", "var content=".$this->resultsToJson().";");
82 82
 		}
83
-		if (isset($this->_bsComponent) === false) {
84
-			$this->_bsComponent=$js->semantic()->search("#" . $this->identifier, $this->_params);
83
+		if (isset($this->_bsComponent)===false) {
84
+			$this->_bsComponent=$js->semantic()->search("#".$this->identifier, $this->_params);
85 85
 		}
86 86
 		$this->addEventsOnRun($js);
87 87
 		return $this->_bsComponent;
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlList.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
 	protected function createItem($value) {
20 20
 		$count=$this->count();
21 21
 		if (\is_array($value)) {
22
-			$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value[0]);
22
+			$item=new HtmlListItem("item-".$this->identifier."-".$count, $value[0]);
23 23
 			$item->addIcon($value[1]);
24
-		} else
25
-			$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value);
24
+		}else
25
+			$item=new HtmlListItem("item-".$this->identifier."-".$count, $value);
26 26
 		return $item;
27 27
 	}
28 28
 
29 29
 	public function addHeader($niveau, $content) {
30
-		$header=new HtmlHeader("header-" . $this->identifier, $niveau, $content, "page");
30
+		$header=new HtmlHeader("header-".$this->identifier, $niveau, $content, "page");
31 31
 		$this->wrap($header);
32 32
 		return $header;
33 33
 	}
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	}
38 38
 
39 39
 	public function asLink() {
40
-		$this->addToPropertyCtrl("class", "link", array ("link" ));
40
+		$this->addToPropertyCtrl("class", "link", array("link"));
41 41
 		return $this->contentAs("a");
42 42
 	}
43 43
 
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 	}
53 53
 
54 54
 	public function run(JsUtils $js) {
55
-		if ($this->_hasCheckedList === true) {
56
-			$jsCode=include dirname(__FILE__) . '/../../components/jsTemplates/tplCheckedList.php';
57
-			$jsCode=\str_replace("%identifier%", "#" . $this->identifier, $jsCode);
55
+		if ($this->_hasCheckedList===true) {
56
+			$jsCode=include dirname(__FILE__).'/../../components/jsTemplates/tplCheckedList.php';
57
+			$jsCode=\str_replace("%identifier%", "#".$this->identifier, $jsCode);
58 58
 			$this->executeOnRun($jsCode);
59 59
 		}
60 60
 		return parent::run($js);
@@ -70,28 +70,28 @@  discard block
 block discarded – undo
70 70
 
71 71
 	public function addCheckedList($items=array(), $masterItem=NULL, $values=array()) {
72 72
 		$count=$this->count();
73
-		$identifier=$this->identifier . "-" . $count;
73
+		$identifier=$this->identifier."-".$count;
74 74
 		if (isset($masterItem)) {
75
-			$masterO=new HtmlFormCheckbox("master-" . $identifier, $masterItem);
75
+			$masterO=new HtmlFormCheckbox("master-".$identifier, $masterItem);
76 76
 			$masterO->getField()->addToProperty("class", "master");
77 77
 			$masterO->setClass("item");
78 78
 			$this->addItem($masterO);
79 79
 		}
80
-		$fields=array ();
80
+		$fields=array();
81 81
 		$i=0;
82
-		foreach ( $items as $val => $caption ) {
83
-			$itemO=new HtmlFormCheckbox($identifier . "-" . $i++, $caption, $val, "child");
84
-			if (\array_search($val, $values) !== false) {
82
+		foreach ($items as $val => $caption) {
83
+			$itemO=new HtmlFormCheckbox($identifier."-".$i++, $caption, $val, "child");
84
+			if (\array_search($val, $values)!==false) {
85 85
 				$itemO->getField()->getField()->setProperty("checked", "");
86 86
 			}
87 87
 			$itemO->setClass("item");
88 88
 			$fields[]=$itemO;
89 89
 		}
90
-		if (isset($masterO) === true) {
90
+		if (isset($masterO)===true) {
91 91
 			$list=new HtmlList("", $fields);
92 92
 			$list->setClass("list");
93 93
 			$masterO->addContent($list);
94
-		} else {
94
+		}else {
95 95
 			$this->addList($fields);
96 96
 		}
97 97
 		$this->_hasCheckedList=true;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,9 @@
 block discarded – undo
21 21
 		if (\is_array($value)) {
22 22
 			$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value[0]);
23 23
 			$item->addIcon($value[1]);
24
-		} else
25
-			$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value);
24
+		} else {
25
+					$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value);
26
+		}
26 27
 		return $item;
27 28
 	}
28 29
 
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemDoubleElement.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,16 +46,16 @@  discard block
 block discarded – undo
46 46
 	}
47 47
 
48 48
 	public function addDimmer($content=NULL) {
49
-		$dimmer=new HtmlDimmer("dimmer-" . $this->identifier, $content);
49
+		$dimmer=new HtmlDimmer("dimmer-".$this->identifier, $content);
50 50
 		$this->addContent($dimmer);
51 51
 		return $dimmer;
52 52
 	}
53 53
 
54 54
 	public function jsShowDimmer($show=true) {
55 55
 		$status="hide";
56
-		if ($show === true)
56
+		if ($show===true)
57 57
 			$status="show";
58
-		return '$("#.' . $this->identifier . ').dimmer("' . $status . '");';
58
+		return '$("#.'.$this->identifier.').dimmer("'.$status.'");';
59 59
 	}
60 60
 
61 61
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	}
66 66
 
67 67
 	public function run(JsUtils $js) {
68
-		$this->_bsComponent=$js->semantic()->generic("#" . $this->identifier);
68
+		$this->_bsComponent=$js->semantic()->generic("#".$this->identifier);
69 69
 		parent::run($js);
70 70
 		$this->addEventsOnRun($js);
71 71
 		if (isset($this->_popup)) {
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,8 +29,9 @@  discard block
 block discarded – undo
29 29
 	}
30 30
 
31 31
 	public function setPopupAttributes($variation=NULL, $popupEvent=NULL) {
32
-		if (isset($this->_popup))
33
-			$this->_popup->setAttributes($variation, $popupEvent);
32
+		if (isset($this->_popup)) {
33
+					$this->_popup->setAttributes($variation, $popupEvent);
34
+		}
34 35
 	}
35 36
 
36 37
 	public function addPopup($title="", $content="", $variation=NULL, $params=array()) {
@@ -53,14 +54,16 @@  discard block
 block discarded – undo
53 54
 
54 55
 	public function jsShowDimmer($show=true) {
55 56
 		$status="hide";
56
-		if ($show === true)
57
-			$status="show";
57
+		if ($show === true) {
58
+					$status="show";
59
+		}
58 60
 		return '$("#.' . $this->identifier . ').dimmer("' . $status . '");';
59 61
 	}
60 62
 
61 63
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
62
-		if (isset($this->_popup))
63
-			$this->_popup->compile();
64
+		if (isset($this->_popup)) {
65
+					$this->_popup->compile();
66
+		}
64 67
 		return parent::compile($js, $view);
65 68
 	}
66 69
 
Please login to merge, or discard this patch.