Code Duplication    Length = 10-10 lines in 4 locations

src/Assert.php 4 locations

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