Code Duplication    Length = 11-13 lines in 2 locations

src/Assert.php 2 locations

@@ 535-545 (lines=11) @@
532
        }
533
    }
534
535
    public static function range($value, $min, $max, $message = '')
536
    {
537
        if ($value < $min || $value > $max) {
538
            static::reportInvalidArgument(sprintf(
539
                $message ?: 'Expected a value between %2$s and %3$s. Got: %s',
540
                static::valueToString($value),
541
                static::valueToString($min),
542
                static::valueToString($max)
543
            ));
544
        }
545
    }
546
547
    public static function oneOf($value, array $values, $message = '')
548
    {
@@ 749-761 (lines=13) @@
746
        }
747
    }
748
749
    public static function lengthBetween($value, $min, $max, $message = '')
750
    {
751
        $length = static::strlen($value);
752
753
        if ($length < $min || $length > $max) {
754
            static::reportInvalidArgument(sprintf(
755
                $message ?: 'Expected a value to contain between %2$s and %3$s characters. Got: %s',
756
                static::valueToString($value),
757
                $min,
758
                $max
759
            ));
760
        }
761
    }
762
763
    public static function fileExists($value, $message = '')
764
    {