Code Duplication    Length = 10-10 lines in 3 locations

src/Assert.php 3 locations

@@ 1063-1072 (lines=10) @@
1060
     *
1061
     * @throws InvalidArgumentException
1062
     */
1063
    public static function notContains($value, $subString, $message = '')
1064
    {
1065
        if (false !== \strpos($value, $subString)) {
1066
            static::reportInvalidArgument(\sprintf(
1067
                $message ?: '%2$s was not expected to be contained in a value. Got: %s',
1068
                static::valueToString($value),
1069
                static::valueToString($subString)
1070
            ));
1071
        }
1072
    }
1073
1074
    /**
1075
     * @param mixed  $value
@@ 1045-1054 (lines=10) @@
1042
     *
1043
     * @throws InvalidArgumentException
1044
     */
1045
    public static function contains($value, $subString, $message = '')
1046
    {
1047
        if (false === \strpos($value, $subString)) {
1048
            static::reportInvalidArgument(\sprintf(
1049
                $message ?: 'Expected a value to contain %2$s. Got: %s',
1050
                static::valueToString($value),
1051
                static::valueToString($subString)
1052
            ));
1053
        }
1054
    }
1055
1056
    /**
1057
     * @param mixed  $value
@@ 1097-1106 (lines=10) @@
1094
     *
1095
     * @throws InvalidArgumentException
1096
     */
1097
    public static function startsWith($value, $prefix, $message = '')
1098
    {
1099
        if (0 !== \strpos($value, $prefix)) {
1100
            static::reportInvalidArgument(\sprintf(
1101
                $message ?: 'Expected a value to start with %2$s. Got: %s',
1102
                static::valueToString($value),
1103
                static::valueToString($prefix)
1104
            ));
1105
        }
1106
    }
1107
1108
    /**
1109
     * @param mixed  $value