Code Duplication    Length = 11-11 lines in 2 locations

src/Assert.php 2 locations

@@ 1354-1364 (lines=11) @@
1351
     *
1352
     * @throws InvalidArgumentException
1353
     */
1354
    public static function file($value, $message = '')
1355
    {
1356
        static::fileExists($value, $message);
1357
1358
        if (!\is_file($value)) {
1359
            static::reportInvalidArgument(\sprintf(
1360
                $message ?: 'The path %s is not a file.',
1361
                static::valueToString($value)
1362
            ));
1363
        }
1364
    }
1365
1366
    /**
1367
     * @param mixed  $value
@@ 1372-1382 (lines=11) @@
1369
     *
1370
     * @throws InvalidArgumentException
1371
     */
1372
    public static function directory($value, $message = '')
1373
    {
1374
        static::fileExists($value, $message);
1375
1376
        if (!\is_dir($value)) {
1377
            static::reportInvalidArgument(\sprintf(
1378
                $message ?: 'The path %s is no directory.',
1379
                static::valueToString($value)
1380
            ));
1381
        }
1382
    }
1383
1384
    /**
1385
     * @param mixed  $value