Code Duplication    Length = 11-11 lines in 2 locations

src/Assert.php 2 locations

@@ 1382-1392 (lines=11) @@
1379
     *
1380
     * @throws InvalidArgumentException
1381
     */
1382
    public static function unicodeLetters($value, $message = '')
1383
    {
1384
        static::string($value);
1385
1386
        if (!\preg_match('/^\p{L}+$/u', $value)) {
1387
            static::reportInvalidArgument(\sprintf(
1388
                $message ?: 'Expected a value to contain only Unicode letters. Got: %s',
1389
                static::valueToString($value)
1390
            ));
1391
        }
1392
    }
1393
1394
    /**
1395
     * @psalm-pure
@@ 1611-1621 (lines=11) @@
1608
     *
1609
     * @throws InvalidArgumentException
1610
     */
1611
    public static function fileExists($value, $message = '')
1612
    {
1613
        static::string($value);
1614
1615
        if (!\file_exists($value)) {
1616
            static::reportInvalidArgument(\sprintf(
1617
                $message ?: 'The file %s does not exist.',
1618
                static::valueToString($value)
1619
            ));
1620
        }
1621
    }
1622
1623
    /**
1624
     * @param mixed  $value