Completed
Push — develop ( ec1aaf...0b0716 )
by Paul
02:09
created
src/Validator.php 1 patch
Braces   +14 added lines, -8 removed lines patch added patch discarded remove patch
@@ -78,7 +78,9 @@  discard block
 block discarded – undo
78 78
 			foreach( $rules as $rule ) {
79 79
 				$this->validateAttribute( $attribute, $rule );
80 80
 
81
-				if( $this->shouldStopValidating( $attribute ))break;
81
+				if( $this->shouldStopValidating( $attribute )) {
82
+					break;
83
+				}
82 84
 			}
83 85
 		}
84 86
 
@@ -161,7 +163,9 @@  discard block
 block discarded – undo
161 163
 	 */
162 164
 	protected function getRule( $attribute, $rules )
163 165
 	{
164
-		if( !array_key_exists( $attribute, $this->rules ))return;
166
+		if( !array_key_exists( $attribute, $this->rules )) {
167
+			return;
168
+		}
165 169
 
166 170
 		$rules = (array) $rules;
167 171
 
@@ -188,8 +192,7 @@  discard block
 block discarded – undo
188 192
 
189 193
 		if( is_numeric( $value ) && $hasNumeric ) {
190 194
 			return $value;
191
-		}
192
-		elseif( is_array( $value )) {
195
+		} elseif( is_array( $value )) {
193 196
 			return count( $value );
194 197
 		}
195 198
 
@@ -253,8 +256,7 @@  discard block
 block discarded – undo
253 256
 		// If an object was provided, get its public properties
254 257
 		if( is_object( $data )) {
255 258
 			$this->data = get_object_vars( $data );
256
-		}
257
-		else {
259
+		} else {
258 260
 			$this->data = $data;
259 261
 		}
260 262
 
@@ -420,7 +422,9 @@  discard block
 block discarded – undo
420 422
 			? $strings[ $key ]
421 423
 			: false;
422 424
 
423
-		if( !$message )return;
425
+		if( !$message ) {
426
+			return;
427
+		}
424 428
 
425 429
 		$message = str_replace( ':attribute', $attribute, $message );
426 430
 
@@ -464,7 +468,9 @@  discard block
 block discarded – undo
464 468
 	{
465 469
 		list( $rule, $parameters ) = $this->parseRule( $rule );
466 470
 
467
-		if( $rule == '' )return;
471
+		if( $rule == '' ) {
472
+			return;
473
+		}
468 474
 
469 475
 		$value = $this->getValue( $attribute );
470 476
 
Please login to merge, or discard this patch.