Completed
Push — master ( 73d774...c4c4fb )
by Rick
01:40
created
src/Ranges.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,8 +19,9 @@  discard block
 block discarded – undo
19 19
 	 */
20 20
 	public static function stringWithLength(int $minimumLength, int $maximumLength): \Closure
21 21
 	{
22
-		if ($maximumLength < 0 || $maximumLength < 1)
23
-			throw new \InvalidArgumentException('Minimum length cannot be below 0, maximum length cannot be below 1');
22
+		if ($maximumLength < 0 || $maximumLength < 1) {
23
+					throw new \InvalidArgumentException('Minimum length cannot be below 0, maximum length cannot be below 1');
24
+		}
24 25
 
25 26
 		return function (string $value) use ($minimumLength, $maximumLength)
26 27
 		{
@@ -53,9 +54,10 @@  discard block
 block discarded – undo
53 54
 		{
54 55
 			if (is_object($value))
55 56
 			{
56
-				foreach ($allowedValues as $allowedValue)
57
-					if (is_a($value, $allowedValue))
57
+				foreach ($allowedValues as $allowedValue) {
58
+									if (is_a($value, $allowedValue))
58 59
 						return true;
60
+				}
59 61
 
60 62
 				return false;
61 63
 			}
Please login to merge, or discard this patch.