Completed
Push — master ( ab500e...03e9d9 )
by Jean-Christophe
04:23
created
Ajax/bootstrap/html/HtmlButtontoolbar.php 2 patches
Doc Comments   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,6 +12,11 @@  discard block
 block discarded – undo
12 12
 
13 13
 class HtmlButtontoolbar extends HtmlButtongroups {
14 14
 
15
+	/**
16
+	 * @param string $identifier
17
+	 * @param string $cssStyle
18
+	 * @param string $size
19
+	 */
15 20
 	public function __construct($identifier, $elements=array(), $cssStyle=NULL, $size=NULL, $tagName="div") {
16 21
 		parent::__construct($identifier, $elements, $cssStyle, $size, $tagName);
17 22
 		$this->setClass("btn-toolbar");
@@ -57,7 +62,7 @@  discard block
 block discarded – undo
57 62
 
58 63
 	/**
59 64
 	 * return the Buttongroups at position $index
60
-	 * @return \Ajax\bootstrap\html\HtmlButtongroups
65
+	 * @return HtmlButton
61 66
 	 */
62 67
 	public function getGroup($index) {
63 68
 		return parent::getElement($index);
Please login to merge, or discard this patch.
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 	 */
47 47
 	private function getLastButtonGroup() {
48 48
 		$nb=sizeof($this->elements);
49
-		if ($nb>0)
50
-			$bg=$this->elements [$nb-1];
51
-		else {
49
+		if ($nb>0) {
50
+					$bg=$this->elements [$nb-1];
51
+		} else {
52 52
 			$bg=new HtmlButtongroups($this->identifier."-buttongroups-".$nb);
53 53
 			$this->elements []=$bg;
54 54
 		}
@@ -66,8 +66,9 @@  discard block
 block discarded – undo
66 66
 	public function getLastGroup() {
67 67
 		$bg=null;
68 68
 		$nb=sizeof($this->elements);
69
-		if ($nb>0)
70
-			$bg=$this->elements [$nb-1];
69
+		if ($nb>0) {
70
+					$bg=$this->elements [$nb-1];
71
+		}
71 72
 		return $bg;
72 73
 	}
73 74
 
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlForm.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -87,6 +87,9 @@
 block discarded – undo
87 87
 		return $result;
88 88
 	}
89 89
 
90
+	/**
91
+	 * @return string
92
+	 */
90 93
 	private function getPrefix($element) {
91 94
 		$result="input_text";
92 95
 		foreach ( $this->formElementsPrefix as $k => $v ) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,8 +99,9 @@
 block discarded – undo
99 99
 	}
100 100
 
101 101
 	public function addGroup($identifier="") {
102
-		if ($identifier==="")
103
-			$identifier="form-".$this->identifier;
102
+		if ($identifier==="") {
103
+					$identifier="form-".$this->identifier;
104
+		}
104 105
 		$group=new HtmlBsDoubleElement($identifier);
105 106
 		$group->setTagName("div");
106 107
 		$group->setClass("form-group");
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlGridsystem.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -16,6 +16,10 @@
 block discarded – undo
16 16
 class HtmlGridSystem extends HtmlBsDoubleElement {
17 17
 	private $rows;
18 18
 	
19
+	/**
20
+	 * @param string $identifier
21
+	 * @param integer $numCols
22
+	 */
19 23
 	public function __construct($identifier,$numRows=1,$numCols=NULL){
20 24
 		parent::__construct($identifier,"div");
21 25
 		$this->setProperty("class", "container-fluid");
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 	public function getRow($index,$force=true){
44 44
 		if($index<sizeof($this->rows)){
45 45
 			$result=$this->rows[$index-1];
46
-		}else if ($force){
46
+		} else if ($force){
47 47
 			$this->setNumRows($index);
48 48
 			$result=$this->rows[$index-1];
49 49
 		}
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlTabs.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@
 block discarded – undo
20 20
 	protected $_tabsType="tabs";
21 21
 	protected $stacked="";
22 22
 
23
+	/**
24
+	 * @param string $identifier
25
+	 */
23 26
 	public function __construct($identifier, $tagName="ul") {
24 27
 		parent::__construct($identifier, $tagName);
25 28
 		$this->_template="<%tagName% %properties%>%tabs%</%tagName%>%content%";
Please login to merge, or discard this patch.
Braces   +17 added lines, -12 removed lines patch added patch discarded remove patch
@@ -35,8 +35,9 @@  discard block
 block discarded – undo
35 35
 					$tab
36 36
 			);
37 37
 			array_splice($this->tabs, $index, 0, $inserted);
38
-		} else
39
-			$this->tabs []=$tab;
38
+		} else {
39
+					$this->tabs []=$tab;
40
+		}
40 41
 	}
41 42
 
42 43
 	public function setActive($index){
@@ -116,9 +117,9 @@  discard block
 block discarded – undo
116 117
 	public function createTabContents() {
117 118
 		$tabContent=new HtmlTabContent("tabcontent-".$this->identifier);
118 119
 		foreach ( $this->tabs as $tab ) {
119
-			if ($tab instanceof HtmlTabItem)
120
-				$tabContent->addTabItem($tab->getHref());
121
-			elseif ($tab instanceof HtmlDropdown) {
120
+			if ($tab instanceof HtmlTabItem) {
121
+							$tabContent->addTabItem($tab->getHref());
122
+			} elseif ($tab instanceof HtmlDropdown) {
122 123
 				foreach ( $tab->getItems() as $dropdownItem ) {
123 124
 					$tabContent->addTabItem($dropdownItem->getHref());
124 125
 				}
@@ -137,8 +138,9 @@  discard block
 block discarded – undo
137 138
 
138 139
 	public function setContentToTab($index, $text) {
139 140
 		$tabContentItem=$this->content->getTabItem($index);
140
-		if (isset($tabContentItem))
141
-			$tabContentItem->setContent($text);
141
+		if (isset($tabContentItem)) {
142
+					$tabContentItem->setContent($text);
143
+		}
142 144
 	}
143 145
 
144 146
 	public function countTabs() {
@@ -146,8 +148,9 @@  discard block
 block discarded – undo
146 148
 	}
147 149
 
148 150
 	public function getTabItem($index) {
149
-		if ($index<sizeof($this->content->get))
150
-			return $this->content;
151
+		if ($index<sizeof($this->content->get)) {
152
+					return $this->content;
153
+		}
151 154
 	}
152 155
 
153 156
 	public function fadeEffect() {
@@ -168,9 +171,11 @@  discard block
 block discarded – undo
168 171
 	}
169 172
 
170 173
 	public function setStacked($stacked=true){
171
-		if($stacked)
172
-			$this->stacked="nav-stacked";
173
-		else $this->stacked="";
174
+		if($stacked) {
175
+					$this->stacked="nav-stacked";
176
+		} else {
177
+			$this->stacked="";
178
+		}
174 179
 	}
175 180
 
176 181
 	/* (non-PHPdoc)
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormFields.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -15,6 +15,9 @@
 block discarded – undo
15 15
 	protected $_equalWidth;
16 16
 	protected $_name;
17 17
 
18
+	/**
19
+	 * @param string $identifier
20
+	 */
18 21
 	public function __construct($identifier, $fields=array(), $equalWidth=true) {
19 22
 		parent::__construct($identifier, "div");
20 23
 		$this->_equalWidth=$equalWidth;
Please login to merge, or discard this patch.
Braces   +18 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,12 +29,14 @@  discard block
 block discarded – undo
29 29
 				if (\is_string($end)) {
30 30
 					$label=$end;
31 31
 					\array_pop($fields);
32
-				} else
33
-					$label=NULL;
32
+				} else {
33
+									$label=NULL;
34
+				}
34 35
 			}
35 36
 		}
36
-		if (isset($label))
37
-			$this->setLabel($label);
37
+		if (isset($label)) {
38
+					$this->setLabel($label);
39
+		}
38 40
 		foreach ( $fields as $field ) {
39 41
 			$this->addItem($field);
40 42
 		}
@@ -57,8 +59,9 @@  discard block
 block discarded – undo
57 59
 
58 60
 	public function addItem($item) {
59 61
 		$item=parent::addItem($item);
60
-		if($item instanceof HtmlFormField)
61
-			$item->setContainer($this);
62
+		if($item instanceof HtmlFormField) {
63
+					$item->setContainer($this);
64
+		}
62 65
 		return $item;
63 66
 	}
64 67
 
@@ -66,8 +69,9 @@  discard block
 block discarded – undo
66 69
 		if ($this->_equalWidth) {
67 70
 			$count=$this->count();
68 71
 			$this->addToProperty("class", Wide::getConstants()["W".$count]." fields");
69
-		} else
70
-			$this->addToProperty("class", "fields");
72
+		} else {
73
+					$this->addToProperty("class", "fields");
74
+		}
71 75
 		return parent::compile($js, $view);
72 76
 	}
73 77
 
@@ -108,8 +112,9 @@  discard block
 block discarded – undo
108 112
 			$fields[]=$itemO;
109 113
 		}
110 114
 		$radios=new HtmlFormFields("fields-".$name, $fields);
111
-		if (isset($label))
112
-			$radios->setLabel($label)->setProperty("for", $name);
115
+		if (isset($label)) {
116
+					$radios->setLabel($label)->setProperty("for", $name);
117
+		}
113 118
 		return $radios;
114 119
 	}
115 120
 
@@ -124,8 +129,9 @@  discard block
 block discarded – undo
124 129
 			$fields[]=$itemO;
125 130
 		}
126 131
 		$radios=new HtmlFormFields("fields-".$name, $fields);
127
-		if (isset($label))
128
-			$radios->setLabel($label)->setProperty("for", $name);
132
+		if (isset($label)) {
133
+					$radios->setLabel($label)->setProperty("for", $name);
134
+		}
129 135
 		return $radios;
130 136
 	}
131 137
 
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/HtmlGrid.php 2 patches
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,6 +22,9 @@  discard block
 block discarded – undo
22 22
 	private $_colSizing=true;
23 23
 	private $_implicitRows=false;
24 24
 
25
+	/**
26
+	 * @param string $identifier
27
+	 */
25 28
 	public function __construct($identifier, $numRows=1, $numCols=NULL, $createCols=true, $implicitRows=false) {
26 29
 		parent::__construct($identifier, "div", "ui grid");
27 30
 		$this->_implicitRows=$implicitRows;
@@ -158,7 +161,7 @@  discard block
 block discarded – undo
158 161
 	/**
159 162
 	 * return the row at $index
160 163
 	 * @param int $index
161
-	 * @return \Ajax\semantic\html\collections\HtmlGridRow
164
+	 * @return \Ajax\common\html\HtmlDoubleElement
162 165
 	 */
163 166
 	public function getRow($index) {
164 167
 		return $this->getItem($index);
@@ -297,7 +300,7 @@  discard block
 block discarded – undo
297 300
 
298 301
 	/**
299 302
 	 * stretch the row contents to take up the entire column height
300
-	 * @return \Ajax\semantic\html\content\HtmlGridRow
303
+	 * @return HtmlGrid
301 304
 	 */
302 305
 	public function setStretched() {
303 306
 		return $this->addToProperty("class", "stretched");
Please login to merge, or discard this patch.
Braces   +24 added lines, -16 removed lines patch added patch discarded remove patch
@@ -32,8 +32,9 @@  discard block
 block discarded – undo
32 32
 			// }
33 33
 			$this->setWide($numCols);
34 34
 		}
35
-		if($createCols)
36
-			$this->setRowsCount($numRows, $numCols);
35
+		if($createCols) {
36
+					$this->setRowsCount($numRows, $numCols);
37
+		}
37 38
 	}
38 39
 
39 40
 	public function asSegment() {
@@ -85,8 +86,9 @@  discard block
 block discarded – undo
85 86
 	public function addCol($width=NULL) {
86 87
 		$colCount=$this->colCount() + 1;
87 88
 		$this->setColsCount($colCount, true, $width);
88
-		if ($this->hasOnlyCols($this->count()))
89
-			return $this->content[$colCount - 1];
89
+		if ($this->hasOnlyCols($this->count())) {
90
+					return $this->content[$colCount - 1];
91
+		}
90 92
 		return $this;
91 93
 	}
92 94
 
@@ -174,8 +176,9 @@  discard block
 block discarded – undo
174 176
 	 */
175 177
 	public function rowCount() {
176 178
 		$count=$this->count();
177
-		if ($this->hasOnlyCols($count))
178
-			return 0;
179
+		if ($this->hasOnlyCols($count)) {
180
+					return 0;
181
+		}
179 182
 		return $count;
180 183
 	}
181 184
 
@@ -185,10 +188,12 @@  discard block
 block discarded – undo
185 188
 	 */
186 189
 	public function colCount() {
187 190
 		$count=$this->count();
188
-		if ($this->hasOnlyCols($count))
189
-			return $count;
190
-		if ($count > 0)
191
-			return $this->getItem(0)->count();
191
+		if ($this->hasOnlyCols($count)) {
192
+					return $count;
193
+		}
194
+		if ($count > 0) {
195
+					return $this->getItem(0)->count();
196
+		}
192 197
 		return 0;
193 198
 	}
194 199
 
@@ -199,8 +204,9 @@  discard block
 block discarded – undo
199 204
 	 * @return \Ajax\semantic\html\collections\HtmlGridCol
200 205
 	 */
201 206
 	public function getCell($row, $col) {
202
-		if ($row < 2 && $this->hasOnlyCols($this->count()))
203
-			return $this->getItem($col);
207
+		if ($row < 2 && $this->hasOnlyCols($this->count())) {
208
+					return $this->getItem($col);
209
+		}
204 210
 		$row=$this->getItem($row);
205 211
 		if (isset($row)) {
206 212
 			$col=$row->getItem($col);
@@ -249,8 +255,9 @@  discard block
 block discarded – undo
249 255
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
250 256
 	 */
251 257
 	public function setPadded($value=NULL) {
252
-		if (isset($value))
253
-			$this->addToPropertyCtrl("class", $value, array ("vertically","horizontally" ));
258
+		if (isset($value)) {
259
+					$this->addToPropertyCtrl("class", $value, array ("vertically","horizontally" ));
260
+		}
254 261
 		return $this->addToProperty("class", "padded");
255 262
 	}
256 263
 
@@ -275,8 +282,9 @@  discard block
 block discarded – undo
275 282
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
276 283
 	 */
277 284
 	protected function createItem($value) {
278
-		if ($this->_createCols === false)
279
-			$value=null;
285
+		if ($this->_createCols === false) {
286
+					$value=null;
287
+		}
280 288
 		$item=new HtmlGridRow($this->identifier . "-row-" . ($this->count() + 1), $value, $this->_colSizing, $this->_implicitRows);
281 289
 		return $item;
282 290
 	}
Please login to merge, or discard this patch.
Ajax/ui/properties/Position.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,9 @@
 block discarded – undo
74 74
 	protected function setParamCtrl($key, $value, $typeCtrl) {
75 75
 		if (!$typeCtrl($value)) {
76 76
 			throw new \Exception("La fonction ".$typeCtrl." a retourné faux pour l'affectation de la propriété ".$key." à la position");
77
-		} else
78
-			$this->setParam($key, $value);
77
+		} else {
78
+					$this->setParam($key, $value);
79
+		}
79 80
 	}
80 81
 
81 82
 	/*
Please login to merge, or discard this patch.
Ajax/ui/components/Accordion.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@
 block discarded – undo
49 49
 	 * @return $this
50 50
 	 */
51 51
 	public function setAnimate($value) {
52
-		if ($value instanceof Animation)
53
-			$value=$value->getParams();
54
-		else if (is_string($value)) {
52
+		if ($value instanceof Animation) {
53
+					$value=$value->getParams();
54
+		} else if (is_string($value)) {
55 55
 			$animation=new Animation();
56 56
 			$animation->setEasing($value);
57 57
 		}
Please login to merge, or discard this patch.
Ajax/ui/components/DialogButton.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@
 block discarded – undo
15 15
 class DialogButton extends BaseComponent {
16 16
 
17 17
 	private function addFunction($jsCode) {
18
-		if (!Text::startsWith($jsCode, "function"))
19
-			$jsCode="%function(){" . $jsCode . "}%";
18
+		if (!Text::startsWith($jsCode, "function")) {
19
+					$jsCode="%function(){" . $jsCode . "}%";
20
+		}
20 21
 		return $jsCode;
21 22
 	}
22 23
 
Please login to merge, or discard this patch.