Code Duplication    Length = 10-10 lines in 3 locations

src/Assert.php 3 locations

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