Code Duplication    Length = 9-9 lines in 2 locations

src/Assert.php 2 locations

@@ 700-708 (lines=9) @@
697
     *
698
     * @throws InvalidArgumentException
699
     */
700
    public static function ip($value, $message = '')
701
    {
702
        if (false === \filter_var($value, \FILTER_VALIDATE_IP)) {
703
            static::reportInvalidArgument(\sprintf(
704
                $message ?: 'Expected a value to be an IP. Got: %s',
705
                static::valueToString($value)
706
            ));
707
        }
708
    }
709
710
    /**
711
     * @param mixed  $value
@@ 748-756 (lines=9) @@
745
     *
746
     * @throws InvalidArgumentException
747
     */
748
    public static function email($value, $message = '')
749
    {
750
        if (false === \filter_var($value, FILTER_VALIDATE_EMAIL)) {
751
            static::reportInvalidArgument(\sprintf(
752
                $message ?: 'Expected a value to be a valid e-mail address. Got %s',
753
                static::valueToString($value)
754
            ));
755
        }
756
    }
757
758
    /**
759
     * Does non strict comparisons on the items, so ['3', 3] will not pass the assertion.