Code Duplication    Length = 9-9 lines in 3 locations

src/Assert.php 3 locations

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