Code Duplication    Length = 9-9 lines in 3 locations

src/Assert.php 3 locations

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