Completed
Push — master ( b92773...4d236d )
by Jean-Christophe
03:15
created
Ajax/semantic/widgets/base/FieldAsTrait.php 2 patches
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -16,7 +16,14 @@
 block discarded – undo
16 16
 
17 17
 trait FieldAsTrait{
18 18
 
19
+	/**
20
+	 * @param string $prefix
21
+	 */
19 22
 	protected abstract function _getFieldIdentifier($prefix);
23
+
24
+	/**
25
+	 * @param \Closure $callback
26
+	 */
20 27
 	public abstract function setValueFunction($index,$callback);
21 28
 
22 29
 	public function fieldAsImage($index,$size=Size::SMALL,$circular=false){
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@
 block discarded – undo
21 21
 
22 22
 	public function fieldAsImage($index,$size=Size::SMALL,$circular=false){
23 23
 		$this->setValueFunction($index,function($img) use($size,$circular){
24
-			$image=new HtmlImage($this->_getFieldIdentifier("image"),$img);$image->setSize($size);if($circular)$image->setCircular();
24
+			$image=new HtmlImage($this->_getFieldIdentifier("image"),$img);$image->setSize($size);if($circular) {
25
+				$image->setCircular();
26
+			}
25 27
 			return $image;
26 28
 		}
27 29
 		);
Please login to merge, or discard this patch.
Ajax/semantic/widgets/datatable/DataTable.php 2 patches
Doc Comments   +25 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,6 +40,10 @@  discard block
 block discarded – undo
40 40
 		parent::run($js);
41 41
 	}
42 42
 
43
+	/**
44
+	 * @param string $identifier
45
+	 * @param string $model
46
+	 */
43 47
 	public function __construct($identifier,$model,$modelInstance=NULL) {
44 48
 		parent::__construct($identifier, $model,$modelInstance);
45 49
 		$this->_instanceViewer=new InstanceViewer();
@@ -166,16 +170,26 @@  discard block
 block discarded – undo
166 170
 		return $this;
167 171
 	}
168 172
 
173
+	/**
174
+	 * @param \Closure $field
175
+	 */
169 176
 	public function addField($field){
170 177
 		$this->_instanceViewer->addField($field);
171 178
 		return $this;
172 179
 	}
173 180
 
181
+	/**
182
+	 * @param integer $index
183
+	 * @param \Closure $field
184
+	 */
174 185
 	public function insertField($index,$field){
175 186
 		$this->_instanceViewer->insertField($index, $field);
176 187
 		return $this;
177 188
 	}
178 189
 
190
+	/**
191
+	 * @param \Closure $field
192
+	 */
179 193
 	public function insertInField($index,$field){
180 194
 		$this->_instanceViewer->insertInField($index, $field);
181 195
 		return $this;
@@ -224,16 +238,16 @@  discard block
 block discarded – undo
224 238
 	/**
225 239
 	 * @param string $caption
226 240
 	 * @param callable $callback
227
-	 * @return callable
241
+	 * @return \Closure
228 242
 	 */
229 243
 	private function getFieldButtonCallable($caption,$callback=null){
230 244
 		return $this->getCallable($this->getFieldButton($caption),$callback);
231 245
 	}
232 246
 
233 247
 	/**
234
-	 * @param mixed $object
248
+	 * @param HtmlButton $object
235 249
 	 * @param callable $callback
236
-	 * @return callable
250
+	 * @return \Closure
237 251
 	 */
238 252
 	private function getCallable($object,$callback=null){
239 253
 		$result=function($instance) use($object,$callback){
@@ -292,12 +306,20 @@  discard block
 block discarded – undo
292 306
 		return $this;
293 307
 	}
294 308
 
309
+	/**
310
+	 * @param string $icon
311
+	 * @param string $class
312
+	 */
295 313
 	private function addDefaultButton($icon,$class=null,$callback=null){
296 314
 		$bt=$this->getDefaultButton($icon,$class);
297 315
 		$this->addField($this->getCallable($bt,$callback));
298 316
 		return $this;
299 317
 	}
300 318
 
319
+	/**
320
+	 * @param string $icon
321
+	 * @param string $class
322
+	 */
301 323
 	private function insertDefaultButtonIn($index,$icon,$class=null,$callback=null){
302 324
 		$bt=$this->getDefaultButton($icon,$class);
303 325
 		$this->insertInField($index,$this->getCallable($bt,$callback));
Please login to merge, or discard this patch.
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,18 +62,21 @@  discard block
 block discarded – undo
62 62
 
63 63
 		$table->setRowCount(0, \sizeof($captions));
64 64
 		$table->setHeaderValues($captions);
65
-		if(isset($this->_compileParts))
66
-			$table->setCompileParts($this->_compileParts);
65
+		if(isset($this->_compileParts)) {
66
+					$table->setCompileParts($this->_compileParts);
67
+		}
67 68
 		if(isset($this->_searchField)){
68
-			if(isset($js))
69
-				$this->_searchField->postOn("change", $this->_urls,"{'s':$(this).val()}","-#".$this->identifier." tbody",["preventDefault"=>false]);
69
+			if(isset($js)) {
70
+							$this->_searchField->postOn("change", $this->_urls,"{'s':$(this).val()}","-#".$this->identifier." tbody",["preventDefault"=>false]);
71
+			}
70 72
 		}
71 73
 
72 74
 		$this->_generateContent($table);
73 75
 
74 76
 		if($this->_hasCheckboxes){
75
-			if($table->hasPart("thead"))
76
-				$table->getHeader()->getCell(0, 0)->addToProperty("class","no-sort");
77
+			if($table->hasPart("thead")) {
78
+							$table->getHeader()->getCell(0, 0)->addToProperty("class","no-sort");
79
+			}
77 80
 		}
78 81
 
79 82
 		if(isset($this->_pagination) && $this->_pagination->getVisible()){
@@ -307,8 +310,9 @@  discard block
 block discarded – undo
307 310
 	private function getDefaultButton($icon,$class=null){
308 311
 		$bt=$this->getFieldButton("");
309 312
 		$bt->asIcon($icon);
310
-		if(isset($class))
311
-			$bt->addToProperty("class", $class);
313
+		if(isset($class)) {
314
+					$bt->addToProperty("class", $class);
315
+		}
312 316
 		return $bt;
313 317
 	}
314 318
 
Please login to merge, or discard this patch.