Code Duplication    Length = 11-13 lines in 2 locations

src/Assert.php 2 locations

@@ 454-464 (lines=11) @@
451
        }
452
    }
453
454
    public static function range($value, $min, $max, $message = '')
455
    {
456
        if ($value < $min || $value > $max) {
457
            static::reportInvalidArgument(sprintf(
458
                $message ?: 'Expected a value between %2$s and %3$s. Got: %s',
459
                static::valueToString($value),
460
                static::valueToString($min),
461
                static::valueToString($max)
462
            ));
463
        }
464
    }
465
466
    public static function oneOf($value, array $values, $message = '')
467
    {
@@ 657-669 (lines=13) @@
654
        }
655
    }
656
657
    public static function lengthBetween($value, $min, $max, $message = '')
658
    {
659
        $length = static::strlen($value);
660
661
        if ($length < $min || $length > $max) {
662
            static::reportInvalidArgument(sprintf(
663
                $message ?: 'Expected a value to contain between %2$s and %3$s characters. Got: %s',
664
                static::valueToString($value),
665
                $min,
666
                $max
667
            ));
668
        }
669
    }
670
671
    public static function fileExists($value, $message = '')
672
    {