Passed
Push — master ( 76bc89...d65707 )
by Jean-Christophe
02:56 queued 11s
created
Ajax/semantic/components/validation/Rule.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,10 +59,12 @@  discard block
 block discarded – undo
59 59
 	#[\ReturnTypeWillChange]
60 60
 	public function jsonSerialize() {
61 61
 		$result= ["type"=>$this->type];
62
-		if(isset($this->prompt))
63
-			$result["prompt"]=$this->prompt;
64
-		if(isset($this->value))
65
-			$result["value"]=$this->value;
62
+		if(isset($this->prompt)) {
63
+					$result["prompt"]=$this->prompt;
64
+		}
65
+		if(isset($this->value)) {
66
+					$result["value"]=$this->value;
67
+		}
66 68
 		return $result;
67 69
 	}
68 70
 
@@ -94,8 +96,9 @@  discard block
 block discarded – undo
94 96
 	 * @return \Ajax\semantic\components\validation\Rule
95 97
 	 */
96 98
 	public static function integer($min=NULL,$max=NULL,$prompt=NULL){
97
-		if(\is_int($min) && \is_int($max))
98
-			return new Rule("integer[{$min}..{$max}]",$prompt);
99
+		if(\is_int($min) && \is_int($max)) {
100
+					return new Rule("integer[{$min}..{$max}]",$prompt);
101
+		}
99 102
 		return new Rule("integer",$prompt);
100 103
 	}
101 104
 
Please login to merge, or discard this patch.