Code Duplication    Length = 11-11 lines in 2 locations

src/Assert.php 2 locations

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