Code Duplication    Length = 10-10 lines in 3 locations

src/Assert.php 3 locations

@@ 539-548 (lines=10) @@
536
        }
537
    }
538
539
    public static function contains($value, $subString, $message = '')
540
    {
541
        if (false === strpos($value, $subString)) {
542
            static::reportInvalidArgument(sprintf(
543
                $message ?: 'Expected a value to contain %2$s. Got: %s',
544
                static::valueToString($value),
545
                static::valueToString($subString)
546
            ));
547
        }
548
    }
549
550
    public static function notContains($value, $subString, $message = '')
551
    {
@@ 550-559 (lines=10) @@
547
        }
548
    }
549
550
    public static function notContains($value, $subString, $message = '')
551
    {
552
        if (false !== strpos($value, $subString)) {
553
            static::reportInvalidArgument(sprintf(
554
                $message ?: '%2$s was not expected to be contained in a value. Got: %s',
555
                static::valueToString($value),
556
                static::valueToString($subString)
557
            ));
558
        }
559
    }
560
561
    public static function notWhitespaceOnly($value, $message = '')
562
    {
@@ 571-580 (lines=10) @@
568
        }
569
    }
570
571
    public static function startsWith($value, $prefix, $message = '')
572
    {
573
        if (0 !== strpos($value, $prefix)) {
574
            static::reportInvalidArgument(sprintf(
575
                $message ?: 'Expected a value to start with %2$s. Got: %s',
576
                static::valueToString($value),
577
                static::valueToString($prefix)
578
            ));
579
        }
580
    }
581
582
    public static function startsWithLetter($value, $message = '')
583
    {