Code Duplication    Length = 10-10 lines in 3 locations

src/Assert.php 3 locations

@@ 650-659 (lines=10) @@
647
        }
648
    }
649
650
    public static function contains($value, $subString, $message = '')
651
    {
652
        if (false === strpos($value, $subString)) {
653
            static::reportInvalidArgument(sprintf(
654
                $message ?: 'Expected a value to contain %2$s. Got: %s',
655
                static::valueToString($value),
656
                static::valueToString($subString)
657
            ));
658
        }
659
    }
660
661
    public static function notContains($value, $subString, $message = '')
662
    {
@@ 661-670 (lines=10) @@
658
        }
659
    }
660
661
    public static function notContains($value, $subString, $message = '')
662
    {
663
        if (false !== strpos($value, $subString)) {
664
            static::reportInvalidArgument(sprintf(
665
                $message ?: '%2$s was not expected to be contained in a value. Got: %s',
666
                static::valueToString($value),
667
                static::valueToString($subString)
668
            ));
669
        }
670
    }
671
672
    public static function notWhitespaceOnly($value, $message = '')
673
    {
@@ 682-691 (lines=10) @@
679
        }
680
    }
681
682
    public static function startsWith($value, $prefix, $message = '')
683
    {
684
        if (0 !== strpos($value, $prefix)) {
685
            static::reportInvalidArgument(sprintf(
686
                $message ?: 'Expected a value to start with %2$s. Got: %s',
687
                static::valueToString($value),
688
                static::valueToString($prefix)
689
            ));
690
        }
691
    }
692
693
    public static function startsWithLetter($value, $message = '')
694
    {