Completed
Push — master ( cfc18c...89eac8 )
by Jean-Christophe
03:42
created
Ajax/common/traits/JsUtilsActionsTrait.php 1 patch
Doc Comments   +10 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,6 +11,11 @@  discard block
 block discarded – undo
11 11
  */
12 12
 trait JsUtilsActionsTrait {
13 13
 
14
+	/**
15
+	 * @param string $element
16
+	 * @param string $js
17
+	 * @param string $event
18
+	 */
14 19
 	abstract public function _add_event($element, $js, $event, $preventDefault=false, $stopPropagation=false,$immediatly=true);
15 20
 	/**
16 21
 	 * show or hide with effect
@@ -35,7 +40,7 @@  discard block
 block discarded – undo
35 40
 	}
36 41
 	/**
37 42
 	 * Ensures the speed parameter is valid for jQuery
38
-	 * @param string|int $speed
43
+	 * @param string $speed
39 44
 	 * @return string
40 45
 	 */
41 46
 	private function _validate_speed($speed) {
@@ -364,7 +369,7 @@  discard block
 block discarded – undo
364 369
 	 *
365 370
 	 * @param string $element
366 371
 	 * @param array $options
367
-	 * @return void
372
+	 * @return string
368 373
 	 */
369 374
 	public function sortable($element, $options=array()) {
370 375
 		if (count($options)>0) {
@@ -435,7 +440,7 @@  discard block
 block discarded – undo
435 440
 	 * @param string $jqueryCall the JQuery callback
436 441
 	 * @param mixed $param array or string parameters
437 442
 	 * @param string $jsCallback javascript code to execute after the jquery call
438
-	 * @return mixed
443
+	 * @return string
439 444
 	 */
440 445
 	public function doJQuery($element, $jqueryCall, $param="", $jsCallback="") {
441 446
 		return $this->_doJQuery($element, $jqueryCall, $param, $jsCallback, true);
@@ -447,7 +452,7 @@  discard block
 block discarded – undo
447 452
 	 * @param string $jqueryCall the JQuery callback
448 453
 	 * @param mixed $param array or string parameters
449 454
 	 * @param string $jsCallback javascript code to execute after the jquery call
450
-	 * @return mixed
455
+	 * @return string
451 456
 	 */
452 457
 	public function doJQueryDeferred($element, $jqueryCall, $param="", $jsCallback="") {
453 458
 		return $this->_doJQuery($element, $jqueryCall, $param, $jsCallback, false);
@@ -459,7 +464,7 @@  discard block
 block discarded – undo
459 464
 	 * @param string $element
460 465
 	 * @param string $elementToModify
461 466
 	 * @param string $jqueryCall
462
-	 * @param string|array $param
467
+	 * @param string $param
463 468
 	 * @param boolean $preventDefault
464 469
 	 * @param boolean $stopPropagation
465 470
 	 * @param string $jsCallback javascript code to execute after the jquery call
@@ -504,7 +509,6 @@  discard block
 block discarded – undo
504 509
 	/**
505 510
 	 * Executes the code $js
506 511
 	 * @param string $js Code to execute
507
-	 * @param boolean $immediatly delayed if false
508 512
 	 * @return String
509 513
 	 */
510 514
 	public function execAtLast($js) {
Please login to merge, or discard this patch.
Ajax/common/traits/JsUtilsInternalTrait.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@  discard block
 block discarded – undo
2 2
 namespace Ajax\common\traits;
3 3
 use Ajax\common\BaseGui;
4 4
 
5
-trait JsUtilsInternalTrait{
5
+trait JsUtilsInternalTrait {
6 6
 
7
-	protected $jquery_code_for_compile=array ();
8
-	protected $jquery_code_for_compile_at_last=array ();
7
+	protected $jquery_code_for_compile=array();
8
+	protected $jquery_code_for_compile_at_last=array();
9 9
 
10 10
 	protected function _addToCompile($jsScript) {
11 11
 		$this->jquery_code_for_compile[]=$jsScript;
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 	 * @param BaseGui $library
16 16
 	 * @param mixed $view
17 17
 	 */
18
-	protected function _compileLibrary(BaseGui $library=NULL, &$view=NULL){
18
+	protected function _compileLibrary(BaseGui $library=NULL, &$view=NULL) {
19 19
 		if ($library!=NULL) {
20
-			if(isset($view))
20
+			if (isset($view))
21 21
 				$library->compileHtml($this, $view);
22 22
 			if ($library->isAutoCompile()) {
23 23
 				$library->compile(true);
@@ -25,20 +25,20 @@  discard block
 block discarded – undo
25 25
 		}
26 26
 	}
27 27
 
28
-	protected function defer($script){
28
+	protected function defer($script) {
29 29
 		$result="window.defer=function (method) {if (window.jQuery) method(); else setTimeout(function() { defer(method) }, 50);};";
30 30
 		$result.="window.defer(function(){".$script."})";
31 31
 		return $result;
32 32
 	}
33 33
 
34
-	protected function ready($script){
34
+	protected function ready($script) {
35 35
 		$result='$(document).ready(function() {'."\n";
36 36
 		$result.=$script.'})';
37 37
 		return $result;
38 38
 	}
39 39
 
40 40
 	protected function minify($input) {
41
-		if(trim($input) === "") return $input;
41
+		if (trim($input)==="") return $input;
42 42
 		return preg_replace(
43 43
 				array(
44 44
 						// Remove comment(s)
Please login to merge, or discard this patch.