Code Duplication    Length = 11-13 lines in 2 locations

src/Assert.php 2 locations

@@ 539-549 (lines=11) @@
536
        }
537
    }
538
539
    public static function range($value, $min, $max, $message = '')
540
    {
541
        if ($value < $min || $value > $max) {
542
            static::reportInvalidArgument(sprintf(
543
                $message ?: 'Expected a value between %2$s and %3$s. Got: %s',
544
                static::valueToString($value),
545
                static::valueToString($min),
546
                static::valueToString($max)
547
            ));
548
        }
549
    }
550
551
    public static function oneOf($value, array $values, $message = '')
552
    {
@@ 765-777 (lines=13) @@
762
        }
763
    }
764
765
    public static function lengthBetween($value, $min, $max, $message = '')
766
    {
767
        $length = static::strlen($value);
768
769
        if ($length < $min || $length > $max) {
770
            static::reportInvalidArgument(sprintf(
771
                $message ?: 'Expected a value to contain between %2$s and %3$s characters. Got: %s',
772
                static::valueToString($value),
773
                $min,
774
                $max
775
            ));
776
        }
777
    }
778
779
    public static function fileExists($value, $message = '')
780
    {