Code Duplication    Length = 11-11 lines in 2 locations

src/Assert.php 2 locations

@@ 1361-1371 (lines=11) @@
1358
     *
1359
     * @throws InvalidArgumentException
1360
     */
1361
    public static function unicodeLetters($value, $message = '')
1362
    {
1363
        static::string($value);
1364
1365
        if (!\preg_match('/^\p{L}+$/u', $value)) {
1366
            static::reportInvalidArgument(\sprintf(
1367
                $message ?: 'Expected a value to contain only Unicode letters. Got: %s',
1368
                static::valueToString($value)
1369
            ));
1370
        }
1371
    }
1372
1373
    /**
1374
     * @psalm-pure
@@ 1590-1600 (lines=11) @@
1587
     *
1588
     * @throws InvalidArgumentException
1589
     */
1590
    public static function fileExists($value, $message = '')
1591
    {
1592
        static::string($value);
1593
1594
        if (!\file_exists($value)) {
1595
            static::reportInvalidArgument(\sprintf(
1596
                $message ?: 'The file %s does not exist.',
1597
                static::valueToString($value)
1598
            ));
1599
        }
1600
    }
1601
1602
    /**
1603
     * @param mixed  $value