Code Duplication    Length = 10-10 lines in 3 locations

src/Assert.php 3 locations

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