Completed
Push — master ( ab9bf6...aac371 )
by Jean-Christophe
03:31
created
Ajax/bootstrap/traits/BootstrapComponentsTrait.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -16,6 +16,9 @@
 block discarded – undo
16 16
 
17 17
 trait BootstrapComponentsTrait {
18 18
 
19
+	/**
20
+	 * @param string|null $attachTo
21
+	 */
19 22
 	public abstract function addComponent(SimpleComponent $component, $attachTo, $params);
20 23
 	/**
21 24
 	 *
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 use Ajax\bootstrap\components\Tab;
12 12
 use Ajax\bootstrap\components\Carousel;
13 13
 use Ajax\bootstrap\components\Collapse;
14
-use Ajax\Bootstrap;
15 14
 use Ajax\common\components\SimpleComponent;
16 15
 
17 16
 trait BootstrapComponentsTrait {
Please login to merge, or discard this patch.
Ajax/common/traits/JqueryActionsTrait.php 2 patches
Doc Comments   +11 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,17 @@  discard block
 block discarded – undo
3 3
 namespace Ajax\common\traits;
4 4
 
5 5
 trait JqueryActionsTrait {
6
+
7
+	/**
8
+	 * @param string $element
9
+	 * @param string $js
10
+	 * @param string $event
11
+	 */
6 12
 	public abstract function _add_event($element, $js, $event, $preventDefault=false, $stopPropagation=false,$immediatly=true);
13
+
14
+	/**
15
+	 * @param string $element
16
+	 */
7 17
 	public abstract function _prep_element($element);
8 18
 	public abstract function _prep_value($value);
9 19
 
@@ -384,7 +394,7 @@  discard block
 block discarded – undo
384 394
 
385 395
 	/**
386 396
 	 * Ensures the speed parameter is valid for jQuery
387
-	 * @param string|int $speed
397
+	 * @param string $speed
388 398
 	 * @return string
389 399
 	 */
390 400
 	private function _validate_speed($speed) {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 namespace Ajax\common\traits;
4 4
 
5 5
 trait JqueryActionsTrait {
6
-	public abstract function _add_event($element, $js, $event, $preventDefault=false, $stopPropagation=false,$immediatly=true);
6
+	public abstract function _add_event($element, $js, $event, $preventDefault=false, $stopPropagation=false, $immediatly=true);
7 7
 	public abstract function _prep_element($element);
8 8
 	public abstract function _prep_value($value);
9 9
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 		if (isset($value)) {
20 20
 			$value=$this->_prep_value($value);
21 21
 			$str="$({$element}).attr(\"$attributeName\",{$value});";
22
-		} else
22
+		}else
23 23
 			$str="$({$element}).attr(\"$attributeName\");";
24 24
 			if ($immediatly)
25 25
 				$this->jquery_code_for_compile[]=$str;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	 * @param boolean $immediatly defers the execution if set to false
34 34
 	 * @return string
35 35
 	 */
36
-	public function after($element='this', $value='', $immediatly=false){
36
+	public function after($element='this', $value='', $immediatly=false) {
37 37
 		$element=$this->_prep_element($element);
38 38
 		$value=$this->_prep_value($value);
39 39
 		$str="$({$element}).after({$value});";
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
 		$animations="\t\t\t";
60 60
 		if (is_array($params)) {
61
-			foreach ( $params as $param => $value ) {
61
+			foreach ($params as $param => $value) {
62 62
 				$animations.=$param.': \''.$value.'\', ';
63 63
 			}
64 64
 		}
@@ -351,8 +351,8 @@  discard block
 block discarded – undo
351 351
 	 * @param boolean $immediatly
352 352
 	 * @return string
353 353
 	 */
354
-	public function _doJQueryOn($event, $element, $elementToModify, $jqueryCall, $param="", $preventDefault=false, $stopPropagation=false, $jsCallback="",$immediatly=true) {
355
-		return $this->_add_event($element, $this->_doJQuery($elementToModify, $jqueryCall, $param, $jsCallback), $event, $preventDefault, $stopPropagation,$immediatly);
354
+	public function _doJQueryOn($event, $element, $elementToModify, $jqueryCall, $param="", $preventDefault=false, $stopPropagation=false, $jsCallback="", $immediatly=true) {
355
+		return $this->_add_event($element, $this->_doJQuery($elementToModify, $jqueryCall, $param, $jsCallback), $event, $preventDefault, $stopPropagation, $immediatly);
356 356
 	}
357 357
 
358 358
 	/**
@@ -378,8 +378,8 @@  discard block
 block discarded – undo
378 378
 	 * @param boolean $immediatly
379 379
 	 * @return String
380 380
 	 */
381
-	public function _execOn($element, $event, $js, $preventDefault=false, $stopPropagation=false,$immediatly=true) {
382
-		return $this->_add_event($element, $this->_exec($js), $event, $preventDefault, $stopPropagation,$immediatly);
381
+	public function _execOn($element, $event, $js, $preventDefault=false, $stopPropagation=false, $immediatly=true) {
382
+		return $this->_add_event($element, $this->_exec($js), $event, $preventDefault, $stopPropagation, $immediatly);
383 383
 	}
384 384
 
385 385
 	/**
@@ -388,8 +388,8 @@  discard block
 block discarded – undo
388 388
 	 * @return string
389 389
 	 */
390 390
 	private function _validate_speed($speed) {
391
-		if (in_array($speed, array (
392
-				'slow','normal','fast'
391
+		if (in_array($speed, array(
392
+				'slow', 'normal', 'fast'
393 393
 		))) {
394 394
 			$speed='"'.$speed.'"';
395 395
 		} elseif (preg_match("/[^0-9]/", $speed)) {
Please login to merge, or discard this patch.