Code Duplication    Length = 10-10 lines in 3 locations

src/Assert.php 3 locations

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