Code Duplication    Length = 9-9 lines in 3 locations

src/Assert.php 3 locations

@@ 511-519 (lines=9) @@
508
        }
509
    }
510
511
    public static function ip($value, $message = '')
512
    {
513
        if (false === filter_var($value, FILTER_VALIDATE_IP)) {
514
            static::reportInvalidArgument(sprintf(
515
                $message ?: 'Expected a value to be an IP. Got: %s',
516
                static::valueToString($value)
517
            ));
518
        }
519
    }
520
521
    public static function ipv4($value, $message = '')
522
    {
@@ 521-529 (lines=9) @@
518
        }
519
    }
520
521
    public static function ipv4($value, $message = '')
522
    {
523
        if (false === filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
524
            static::reportInvalidArgument(sprintf(
525
                $message ?: 'Expected a value to be an IPv4. Got: %s',
526
                static::valueToString($value)
527
            ));
528
        }
529
    }
530
531
    public static function ipv6($value, $message = '')
532
    {
@@ 531-539 (lines=9) @@
528
        }
529
    }
530
531
    public static function ipv6($value, $message = '')
532
    {
533
        if (false === filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
534
            static::reportInvalidArgument(sprintf(
535
                $message ?: 'Expected a value to be an IPv6. Got %s',
536
                static::valueToString($value)
537
            ));
538
        }
539
    }
540
541
    public static function eq($value, $value2, $message = '')
542
    {