Completed
Push — master ( 7602ab...eb9d7e )
by Jean-Christophe
05:28 queued 02:19
created
Ajax/common/BaseEnum.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,14 +24,14 @@
 block discarded – undo
24 24
 	}
25 25
 
26 26
 	public static function getConstantValues($postFix="",$prefixBefore=false) {
27
-		if ($postFix == "")
28
-			return \array_values(self::getConstants());
29
-		else {
27
+		if ($postFix == "") {
28
+					return \array_values(self::getConstants());
29
+		} else {
30 30
 			if($prefixBefore===false){
31 31
 				return \array_map(function ($elem) use($postFix) {
32 32
 					return $elem . " " . $postFix;
33 33
 				}, \array_values(self::getConstants()));
34
-			}else{
34
+			} else{
35 35
 				return \array_map(function ($elem) use($postFix) {
36 36
 					return $postFix." ".$elem;
37 37
 				}, \array_values(self::getConstants()));
Please login to merge, or discard this patch.
Ajax/common/html/html5/HtmlInput.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,8 +16,9 @@  discard block
 block discarded – undo
16 16
 	}
17 17
 
18 18
 	public function setValue($value) {
19
-		if(isset($value))
20
-		$this->setProperty("value", $value);
19
+		if(isset($value)) {
20
+				$this->setProperty("value", $value);
21
+		}
21 22
 		return $this;
22 23
 	}
23 24
 
@@ -27,11 +28,13 @@  discard block
 block discarded – undo
27 28
 
28 29
 	public function setPlaceholder($value){
29 30
 		if(JString::isNull($value)){
30
-			if(JString::isNotNull($this->identifier))
31
-				$value=\ucfirst($this->identifier);
31
+			if(JString::isNotNull($this->identifier)) {
32
+							$value=\ucfirst($this->identifier);
33
+			}
34
+		}
35
+		if(JString::isNotNull($value)) {
36
+					$this->setProperty("placeholder", $value);
32 37
 		}
33
-		if(JString::isNotNull($value))
34
-			$this->setProperty("placeholder", $value);
35 38
 		return $this;
36 39
 	}
37 40
 }
38 41
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/common/html/html5/HtmlTextarea.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,18 +11,21 @@
 block discarded – undo
11 11
 		parent::__construct($identifier, "textarea");
12 12
 		$this->setValue($value);
13 13
 		$this->setPlaceholder($placeholder);
14
-		if(isset($rows))
15
-			$this->setRows($rows);
14
+		if(isset($rows)) {
15
+					$this->setRows($rows);
16
+		}
16 17
 	}
17 18
 	public function setValue($value) {
18
-		if(isset($value))
19
-			$this->setContent($value);
19
+		if(isset($value)) {
20
+					$this->setContent($value);
21
+		}
20 22
 		return $this;
21 23
 	}
22 24
 
23 25
 	public function setPlaceholder($value){
24
-		if(JString::isNotNull($value))
25
-			$this->setProperty("placeholder", $value);
26
+		if(JString::isNotNull($value)) {
27
+					$this->setProperty("placeholder", $value);
28
+		}
26 29
 		return $this;
27 30
 	}
28 31
 
Please login to merge, or discard this patch.
Ajax/common/html/html5/HtmlSelect.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	public function addOption($element,$value="",$selected=false){
26 26
 		if($element instanceof HtmlOption){
27 27
 			$option=$element;
28
-		}else{
28
+		} else{
29 29
 			$option=new HtmlOption($this->identifier."-".count($this->options), $element,$value);
30 30
 		}
31 31
 		if($selected || $option->getValue()==$this->getProperty("value")){
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 			foreach ($array as $k=>$v){
65 65
 				$this->addOption($v, $k);
66 66
 			}
67
-		}else{
67
+		} else{
68 68
 			foreach ($array as $v){
69 69
 				$this->addOption($v, $v);
70 70
 			}
Please login to merge, or discard this patch.
Ajax/common/html/PropertyWrapper.php 1 patch
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,8 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 	private static function containsElement($input) {
27 27
 		foreach ( $input as $v ) {
28
-			if (\is_object($v) === true || \is_array($v))
29
-				return true;
28
+			if (\is_object($v) === true || \is_array($v)) {
29
+							return true;
30
+			}
30 31
 		}
31 32
 		return false;
32 33
 	}
@@ -44,12 +45,13 @@  discard block
 block discarded – undo
44 45
 
45 46
 	public static function wrapObjects($input, $js=NULL, $separator=' ', $valueQuote='"') {
46 47
 		return implode($separator, array_map(function ($v) use($js, $separator, $valueQuote) {
47
-			if (is_object($v))
48
-				return $v->compile($js);
49
-			elseif (\is_array($v)) {
48
+			if (is_object($v)) {
49
+							return $v->compile($js);
50
+			} elseif (\is_array($v)) {
50 51
 				return self::wrap($v, $js, $separator, $valueQuote);
51
-			} else
52
-				return $v;
52
+			} else {
53
+							return $v;
54
+			}
53 55
 		}, $input));
54 56
 	}
55 57
 }
56 58
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/common/html/HtmlDoubleElement.php 1 patch
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,15 +29,17 @@
 block discarded – undo
29 29
 
30 30
 	public function addContent($content,$before=false) {
31 31
 		if (is_array($this->content)===false) {
32
-			if(isset($this->content))
33
-				$this->content=array ($this->content);
34
-			else
35
-				$this->content=array();
32
+			if(isset($this->content)) {
33
+							$this->content=array ($this->content);
34
+			} else {
35
+							$this->content=array();
36
+			}
37
+		}
38
+		if($before) {
39
+					array_unshift($this->content,$content);
40
+		} else {
41
+					$this->content []=$content;
36 42
 		}
37
-		if($before)
38
-			array_unshift($this->content,$content);
39
-		else
40
-			$this->content []=$content;
41 43
 		return $this;
42 44
 	}
43 45
 
Please login to merge, or discard this patch.
Ajax/service/JArray.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,21 +14,24 @@  discard block
 block discarded – undo
14 14
 			return $array[$key];
15 15
 		}
16 16
 		$values=array_values($array);
17
-		if ($pos < sizeof($values))
18
-			return $values[$pos];
17
+		if ($pos < sizeof($values)) {
18
+					return $values[$pos];
19
+		}
19 20
 	}
20 21
 
21 22
 	public static function getConditionalValue($array, $key, $condition) {
22 23
 		$result=NULL;
23 24
 		if (array_key_exists($key, $array)) {
24 25
 			$result=$array[$key];
25
-			if ($condition($result) === true)
26
-				return $result;
26
+			if ($condition($result) === true) {
27
+							return $result;
28
+			}
27 29
 		}
28 30
 		$values=array_values($array);
29 31
 		foreach ( $values as $val ) {
30
-			if ($condition($val) === true)
31
-				return $val;
32
+			if ($condition($val) === true) {
33
+							return $val;
34
+			}
32 35
 		}
33 36
 		return $result;
34 37
 	}
@@ -36,8 +39,9 @@  discard block
 block discarded – undo
36 39
 	public static function getDefaultValue($array, $key, $default=NULL) {
37 40
 		if (array_key_exists($key, $array)) {
38 41
 			return $array[$key];
39
-		} else
40
-			return $default;
42
+		} else {
43
+					return $default;
44
+		}
41 45
 	}
42 46
 
43 47
 	public static function implode($glue, $pieces) {
Please login to merge, or discard this patch.
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
 		$result="";
20 21
 		$params="{}";
21 22
 		$callback=NULL;
Please login to merge, or discard this patch.
Ajax/php/symfony/JsUtils.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 		if(isset($router)===true){
14 14
 			try {
15 15
 			$url=$router->generate($url);
16
-			}catch (\Exception $e){
16
+			} catch (\Exception $e){
17 17
 				return $router->getContext()->getBaseUrl();
18 18
 			}
19 19
 		}
Please login to merge, or discard this patch.