Code Duplication    Length = 10-10 lines in 3 locations

src/Assert.php 3 locations

@@ 630-639 (lines=10) @@
627
        }
628
    }
629
630
    public static function contains($value, $subString, $message = '')
631
    {
632
        if (false === strpos($value, $subString)) {
633
            static::reportInvalidArgument(sprintf(
634
                $message ?: 'Expected a value to contain %2$s. Got: %s',
635
                static::valueToString($value),
636
                static::valueToString($subString)
637
            ));
638
        }
639
    }
640
641
    public static function notContains($value, $subString, $message = '')
642
    {
@@ 641-650 (lines=10) @@
638
        }
639
    }
640
641
    public static function notContains($value, $subString, $message = '')
642
    {
643
        if (false !== strpos($value, $subString)) {
644
            static::reportInvalidArgument(sprintf(
645
                $message ?: '%2$s was not expected to be contained in a value. Got: %s',
646
                static::valueToString($value),
647
                static::valueToString($subString)
648
            ));
649
        }
650
    }
651
652
    public static function notWhitespaceOnly($value, $message = '')
653
    {
@@ 662-671 (lines=10) @@
659
        }
660
    }
661
662
    public static function startsWith($value, $prefix, $message = '')
663
    {
664
        if (0 !== strpos($value, $prefix)) {
665
            static::reportInvalidArgument(sprintf(
666
                $message ?: 'Expected a value to start with %2$s. Got: %s',
667
                static::valueToString($value),
668
                static::valueToString($prefix)
669
            ));
670
        }
671
    }
672
673
    public static function startsWithLetter($value, $message = '')
674
    {