Code Duplication    Length = 10-10 lines in 3 locations

src/Assert.php 3 locations

@@ 596-605 (lines=10) @@
593
        }
594
    }
595
596
    public static function contains($value, $subString, $message = '')
597
    {
598
        if (false === strpos($value, $subString)) {
599
            static::reportInvalidArgument(sprintf(
600
                $message ?: 'Expected a value to contain %2$s. Got: %s',
601
                static::valueToString($value),
602
                static::valueToString($subString)
603
            ));
604
        }
605
    }
606
607
    public static function notContains($value, $subString, $message = '')
608
    {
@@ 607-616 (lines=10) @@
604
        }
605
    }
606
607
    public static function notContains($value, $subString, $message = '')
608
    {
609
        if (false !== strpos($value, $subString)) {
610
            static::reportInvalidArgument(sprintf(
611
                $message ?: '%2$s was not expected to be contained in a value. Got: %s',
612
                static::valueToString($value),
613
                static::valueToString($subString)
614
            ));
615
        }
616
    }
617
618
    public static function notWhitespaceOnly($value, $message = '')
619
    {
@@ 628-637 (lines=10) @@
625
        }
626
    }
627
628
    public static function startsWith($value, $prefix, $message = '')
629
    {
630
        if (0 !== strpos($value, $prefix)) {
631
            static::reportInvalidArgument(sprintf(
632
                $message ?: 'Expected a value to start with %2$s. Got: %s',
633
                static::valueToString($value),
634
                static::valueToString($prefix)
635
            ));
636
        }
637
    }
638
639
    public static function startsWithLetter($value, $message = '')
640
    {