@@ -68,6 +68,9 @@ discard block |
||
| 68 | 68 | return \DateTime::createFromFormat(self::FORMAT_RFC3339, $dateString); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | + /** |
|
| 72 | + * @param string $string |
|
| 73 | + */ |
|
| 71 | 74 | private function isValidDateAgainstRegex($string): bool |
| 72 | 75 | { |
| 73 | 76 | if (preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/',$string)) { |
@@ -77,6 +80,9 @@ discard block |
||
| 77 | 80 | return false; |
| 78 | 81 | } |
| 79 | 82 | |
| 83 | + /** |
|
| 84 | + * @param string $string |
|
| 85 | + */ |
|
| 80 | 86 | private function isValidDateTimeAgainstRegex($string): bool |
| 81 | 87 | { |
| 82 | 88 | if (preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T(0[0-9]|1[0-9]|2[0-3]):\d\d:\d\d\+\d\d:\d\d$/',$string)) { |
@@ -22,6 +22,9 @@ |
||
| 22 | 22 | return false; |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | + /** |
|
| 26 | + * @param string $string |
|
| 27 | + */ |
|
| 25 | 28 | private function isValidUuidAgainstRegex($string): bool |
| 26 | 29 | { |
| 27 | 30 | if (preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $string)) { |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | * Exceptions are caught in order to be processed later |
| 21 | 21 | * @param mixed $value String ? |
| 22 | 22 | * |
| 23 | - * @return mixed Untouched value |
|
| 23 | + * @return string Untouched value |
|
| 24 | 24 | */ |
| 25 | 25 | public function mustHaveLengthBetween($value, int $min, int $max, string $propertyPath = null, UIValidatorInterface $parentValidator = null, string $exceptionMessage = null) |
| 26 | 26 | { |