Completed
Push — master ( a4feba...3ad5ef )
by Jean-Christophe
03:50
created
Ajax/service/AjaxCall.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@
 block discarded – undo
14 14
 	}
15 15
 
16 16
 	public function compile(JsUtils $js=null) {
17
-		if ($js==null)
18
-			return;
17
+		if ($js==null) {
18
+					return;
19
+		}
19 20
 		$params="{}";
20 21
 		$jsCallback=NULL;
21 22
 		$attr="id";
Please login to merge, or discard this patch.
Ajax/common/components/SimpleComponent.php 1 patch
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 			//echo $itemSelector.":::".$jsCode."<br>";
29 29
 			if($event=="execute"){
30 30
 				$this->jquery_code_for_compile []=$jsCode;
31
-			}else if($event=="beforeExecute"){
31
+			} else if($event=="beforeExecute"){
32 32
 				\array_unshift($this->jquery_code_for_compile, $jsCode);
33
-			}else{
33
+			} else{
34 34
 				$selector=$this->_createSelector($itemSelector, $this->attachTo);
35 35
 				$this->jquery_code_for_compile []="$( \"".$selector."\" ).on(\"".$event."\" , function( event, data ) {".$jsCode."});";
36 36
 			}
@@ -38,10 +38,12 @@  discard block
 block discarded – undo
38 38
 	}
39 39
 
40 40
 	protected function _createSelector($itemSelector,$selector){
41
-		if(!isset($itemSelector))
42
-			$itemSelector=$this->itemSelector;
43
-		if(isset($itemSelector) && $itemSelector!=="")
44
-			$selector.=" ".$itemSelector;
41
+		if(!isset($itemSelector)) {
42
+					$itemSelector=$this->itemSelector;
43
+		}
44
+		if(isset($itemSelector) && $itemSelector!=="") {
45
+					$selector.=" ".$itemSelector;
46
+		}
45 47
 		return $selector;
46 48
 	}
47 49
 
@@ -84,8 +86,9 @@  discard block
 block discarded – undo
84 86
 
85 87
 	protected function setParamCtrl($key, $value, $typeCtrl) {
86 88
 		if (\is_array($typeCtrl)) {
87
-			if (array_search($value, $typeCtrl)===false)
88
-				throw new \Exception("La valeur passée a propriété `".$key."` pour le composant `".$this->uiName."` ne fait pas partie des valeurs possibles : {".implode(",", $typeCtrl)."}");
89
+			if (array_search($value, $typeCtrl)===false) {
90
+							throw new \Exception("La valeur passée a propriété `".$key."` pour le composant `".$this->uiName."` ne fait pas partie des valeurs possibles : {".implode(",", $typeCtrl)."}");
91
+			}
89 92
 		} else {
90 93
 			if (!$typeCtrl($value)) {
91 94
 				throw new \Exception("La fonction ".$typeCtrl." a retourné faux pour l'affectation de la propriété ".$key." au composant ".$this->uiName);
Please login to merge, or discard this patch.