@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | public static function getAlphaValidator(?array $additionalCharacters = null, ?string $hint = null): \Closure |
13 | 13 | { |
14 | - return function (string $value) use ($additionalCharacters, $hint) { |
|
14 | + return function(string $value) use ($additionalCharacters, $hint) { |
|
15 | 15 | $value = trim($value); |
16 | 16 | $pattern = '/^[a-zA-Z0-9'; |
17 | 17 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | public static function getAbsolutePathValidator(): \Closure |
39 | 39 | { |
40 | - return function (string $value) { |
|
40 | + return function(string $value) { |
|
41 | 41 | $value = trim($value); |
42 | 42 | if (!\preg_match('/^[\'"]?(?:\/[^\/\n]+)*[\'"]?$/', $value)) { |
43 | 43 | throw new \InvalidArgumentException('Invalid value "' . $value . '". Hint: path has to be absolute without trailing "/".'); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | public static function getDomainNameValidator(): \Closure |
50 | 50 | { |
51 | - return function (string $value) { |
|
51 | + return function(string $value) { |
|
52 | 52 | $value = trim($value); |
53 | 53 | if (!\preg_match('/^(?!:\/\/)([a-zA-Z0-9-_]+\.)*[a-zA-Z0-9][a-zA-Z0-9-_]+\.[a-zA-Z]{2,11}?$/im', $value)) { |
54 | 54 | throw new \InvalidArgumentException('Invalid value "' . $value . '". Hint: the domain name must not start with "http(s)://".'); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | public static function getDomainNameWithPortValidator(): \Closure |
61 | 61 | { |
62 | - return function (string $value) { |
|
62 | + return function(string $value) { |
|
63 | 63 | $value = trim($value); |
64 | 64 | if (!\preg_match('/^(?!:\/\/)([a-zA-Z0-9-_]+\.)*[a-zA-Z0-9][a-zA-Z0-9-_]+\.[a-zA-Z]{2,11}?:\d*$/im', $value)) { |
65 | 65 | throw new \InvalidArgumentException('Invalid value "' . $value . '". Hint: the domain name must not start with "http(s)://".'); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | public static function getIPv4Validator(): \Closure |
72 | 72 | { |
73 | - return function (string $value) { |
|
73 | + return function(string $value) { |
|
74 | 74 | $value = trim($value); |
75 | 75 | if (!\preg_match('/^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/', $value)) { |
76 | 76 | throw new \InvalidArgumentException('Invalid value "' . $value . '".'); |