Code Duplication    Length = 10-10 lines in 3 locations

src/Assert.php 3 locations

@@ 560-569 (lines=10) @@
557
        }
558
    }
559
560
    public static function contains($value, $subString, $message = '')
561
    {
562
        if (false === strpos($value, $subString)) {
563
            static::reportInvalidArgument(sprintf(
564
                $message ?: 'Expected a value to contain %2$s. Got: %s',
565
                static::valueToString($value),
566
                static::valueToString($subString)
567
            ));
568
        }
569
    }
570
571
    public static function notContains($value, $subString, $message = '')
572
    {
@@ 571-580 (lines=10) @@
568
        }
569
    }
570
571
    public static function notContains($value, $subString, $message = '')
572
    {
573
        if (false !== strpos($value, $subString)) {
574
            static::reportInvalidArgument(sprintf(
575
                $message ?: '%2$s was not expected to be contained in a value. Got: %s',
576
                static::valueToString($value),
577
                static::valueToString($subString)
578
            ));
579
        }
580
    }
581
582
    public static function notWhitespaceOnly($value, $message = '')
583
    {
@@ 592-601 (lines=10) @@
589
        }
590
    }
591
592
    public static function startsWith($value, $prefix, $message = '')
593
    {
594
        if (0 !== strpos($value, $prefix)) {
595
            static::reportInvalidArgument(sprintf(
596
                $message ?: 'Expected a value to start with %2$s. Got: %s',
597
                static::valueToString($value),
598
                static::valueToString($prefix)
599
            ));
600
        }
601
    }
602
603
    public static function startsWithLetter($value, $message = '')
604
    {