Passed
Push — master ( c653a4...a7d880 )
by Jean-Christophe
02:17
created
Ajax/ui/components/Progressbar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@
 block discarded – undo
14 14
 
15 15
 	public function __construct(JsUtils $js) {
16 16
 		parent::__construct($js);
17
-		$this->params = array(
17
+		$this->params=array(
18 18
 			"value" => 50
19 19
 		);
20
-		$this->uiName = "progressbar";
20
+		$this->uiName="progressbar";
21 21
 	}
22 22
 }
Please login to merge, or discard this patch.
Ajax/ui/components/DialogButton.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,15 +14,15 @@  discard block
 block discarded – undo
14 14
 class DialogButton extends BaseComponent {
15 15
 
16 16
 	private function addFunction($jsCode) {
17
-		if (! JString::startsWith($jsCode, "function"))
18
-			$jsCode = "%function(){" . $jsCode . "}%";
17
+		if (!JString::startsWith($jsCode, "function"))
18
+			$jsCode="%function(){".$jsCode."}%";
19 19
 		return $jsCode;
20 20
 	}
21 21
 
22
-	public function __construct($caption, $jsCode, $event = "click") {
22
+	public function __construct($caption, $jsCode, $event="click") {
23 23
 		parent::__construct(NULL);
24
-		$this->params["text"] = $caption;
25
-		$this->params[$event] = $this->addFunction($jsCode);
24
+		$this->params["text"]=$caption;
25
+		$this->params[$event]=$this->addFunction($jsCode);
26 26
 	}
27 27
 
28 28
 	public function __toString() {
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 		return json_encode($this->params, JSON_UNESCAPED_SLASHES);
38 38
 	}
39 39
 
40
-	public static function cancelButton($caption = "Annuler") {
40
+	public static function cancelButton($caption="Annuler") {
41 41
 		return new DialogButton($caption, "$( this ).dialog( 'close' );");
42 42
 	}
43 43
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 *        	default : array("params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"jqueryDone"=>"html","ajaxTransition"=>null,"jsCondition"=>NULL,"headers"=>null)
53 53
 	 * @return DialogButton
54 54
 	 */
55
-	public static function submitButton(JsUtils $js, $url, $form, $responseElement, $caption = "Okay", $parameters = []) {
56
-		return new DialogButton($caption, $js->postFormDeferred($url, $form, $responseElement, $parameters) . ";$( this ).dialog( 'close' );");
55
+	public static function submitButton(JsUtils $js, $url, $form, $responseElement, $caption="Okay", $parameters=[]) {
56
+		return new DialogButton($caption, $js->postFormDeferred($url, $form, $responseElement, $parameters).";$( this ).dialog( 'close' );");
57 57
 	}
58 58
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@
 block discarded – undo
14 14
 class DialogButton extends BaseComponent {
15 15
 
16 16
 	private function addFunction($jsCode) {
17
-		if (! JString::startsWith($jsCode, "function"))
18
-			$jsCode = "%function(){" . $jsCode . "}%";
17
+		if (! JString::startsWith($jsCode, "function")) {
18
+					$jsCode = "%function(){" . $jsCode . "}%";
19
+		}
19 20
 		return $jsCode;
20 21
 	}
21 22
 
Please login to merge, or discard this patch.
Ajax/ui/components/Buttonset.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
 	public function __construct(JsUtils $js) {
16 16
 		parent::__construct($js);
17
-		$this->uiName = "buttonset";
17
+		$this->uiName="buttonset";
18 18
 	}
19 19
 
20 20
 	/**
Please login to merge, or discard this patch.
Ajax/ui/properties/Position.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  */
12 12
 class Position extends BaseComponent {
13 13
 
14
-	public function __construct($my = "left top", $at = "left bottom", $collision = "none", $within = "window") {
14
+	public function __construct($my="left top", $at="left bottom", $collision="none", $within="window") {
15 15
 		$this->setParam("my", $my);
16 16
 		$this->setParam("at", $at);
17 17
 		$this->setParam("collision", $collision);
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
 	}
83 83
 
84 84
 	protected function setParamCtrl($key, $value, $typeCtrl) {
85
-		if (! $typeCtrl($value)) {
86
-			throw new \Exception("La fonction " . $typeCtrl . " a retourné faux pour l'affectation de la propriété " . $key . " à la position");
85
+		if (!$typeCtrl($value)) {
86
+			throw new \Exception("La fonction ".$typeCtrl." a retourné faux pour l'affectation de la propriété ".$key." à la position");
87 87
 		} else
88 88
 			$this->setParam($key, $value);
89 89
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,8 +84,9 @@
 block discarded – undo
84 84
 	protected function setParamCtrl($key, $value, $typeCtrl) {
85 85
 		if (! $typeCtrl($value)) {
86 86
 			throw new \Exception("La fonction " . $typeCtrl . " a retourné faux pour l'affectation de la propriété " . $key . " à la position");
87
-		} else
88
-			$this->setParam($key, $value);
87
+		} else {
88
+					$this->setParam($key, $value);
89
+		}
89 90
 	}
90 91
 
91 92
 	/*
Please login to merge, or discard this patch.
Ajax/ui/properties/Animation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  */
12 12
 class Animation extends BaseComponent {
13 13
 
14
-	public function __construct($duration = 400, $easing = "swing", $queue = false) {
14
+	public function __construct($duration=400, $easing="swing", $queue=false) {
15 15
 		$this->setDuration($duration);
16 16
 		$this->setEasing($easing);
17 17
 		$this->setQueue($queue);
Please login to merge, or discard this patch.