| @@ 1195-1205 (lines=11) @@ | ||
| 1192 | * | |
| 1193 | * @throws InvalidArgumentException | |
| 1194 | */ | |
| 1195 | public static function unicodeLetters($value, $message = '') | |
| 1196 |     { | |
| 1197 | static::string($value); | |
| 1198 | ||
| 1199 |         if (!\preg_match('/^\p{L}+$/u', $value)) { | |
| 1200 | static::reportInvalidArgument(\sprintf( | |
| 1201 | $message ?: 'Expected a value to contain only Unicode letters. Got: %s', | |
| 1202 | static::valueToString($value) | |
| 1203 | )); | |
| 1204 | } | |
| 1205 | } | |
| 1206 | ||
| 1207 | /** | |
| 1208 | * @param mixed $value | |
| @@ 1404-1414 (lines=11) @@ | ||
| 1401 | * | |
| 1402 | * @throws InvalidArgumentException | |
| 1403 | */ | |
| 1404 | public static function fileExists($value, $message = '') | |
| 1405 |     { | |
| 1406 | static::string($value); | |
| 1407 | ||
| 1408 |         if (!\file_exists($value)) { | |
| 1409 | static::reportInvalidArgument(\sprintf( | |
| 1410 | $message ?: 'The file %s does not exist.', | |
| 1411 | static::valueToString($value) | |
| 1412 | )); | |
| 1413 | } | |
| 1414 | } | |
| 1415 | ||
| 1416 | /** | |
| 1417 | * @param mixed $value | |