Completed
Push — master ( e643a3...72ae1f )
by Todd
04:17
created
src/Validation/Validator/IsIterable.php 1 patch
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,13 +11,18 @@
 block discarded – undo
11 11
   const DEFAULT_DESCRIPTION = 'Must be iterable';
12 12
 
13 13
   public function __construct($description = null) {
14
-    if (!is_null($description))
15
-      $this->description = $description;
14
+    if (!is_null($description)) {
15
+          $this->description = $description;
16
+    }
16 17
   }
17 18
 
18 19
   public function validate($value): bool {
19
-    if (is_array($value)) return true;
20
-    if (is_object($value) && $value instanceof \Traversable) return true;
20
+    if (is_array($value)) {
21
+      return true;
22
+    }
23
+    if (is_object($value) && $value instanceof \Traversable) {
24
+      return true;
25
+    }
21 26
     return false;
22 27
   }
23 28
 
Please login to merge, or discard this patch.
src/Validation/Validator/Regex.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
    * @throws Exception
15 15
    */
16 16
   public function __construct($pattern, $description = null) {
17
-    if (!$this->isValidRegexPattern($pattern))
18
-      throw new Exception("Invalid Regex pattern: {$pattern}");
17
+    if (!$this->isValidRegexPattern($pattern)) {
18
+          throw new Exception("Invalid Regex pattern: {$pattern}");
19
+    }
19 20
     $this->pattern = $pattern;
20 21
     $this->message = $description ?? "Must match pattern: {$pattern}";
21 22
   }
Please login to merge, or discard this patch.