Code Duplication    Length = 11-11 lines in 2 locations

src/Assert.php 2 locations

@@ 1142-1152 (lines=11) @@
1139
     *
1140
     * @throws InvalidArgumentException
1141
     */
1142
    public static function unicodeLetters($value, $message = '')
1143
    {
1144
        static::string($value);
1145
1146
        if (!\preg_match('/^\p{L}+$/u', $value)) {
1147
            static::reportInvalidArgument(\sprintf(
1148
                $message ?: 'Expected a value to contain only Unicode letters. Got: %s',
1149
                static::valueToString($value)
1150
            ));
1151
        }
1152
    }
1153
1154
    /**
1155
     * @psalm-assert string $value
@@ 1353-1363 (lines=11) @@
1350
     *
1351
     * @throws InvalidArgumentException
1352
     */
1353
    public static function fileExists($value, $message = '')
1354
    {
1355
        static::string($value);
1356
1357
        if (!\file_exists($value)) {
1358
            static::reportInvalidArgument(\sprintf(
1359
                $message ?: 'The file %s does not exist.',
1360
                static::valueToString($value)
1361
            ));
1362
        }
1363
    }
1364
1365
    /**
1366
     * @param mixed  $value