src/Robin/Ntlm/Encoding/Exception/EncodingDetectionException.php
public static function forString($string, $code = self::CODE_FOR_STRING, Exception $previous = null)
    {
        $message = self::DEFAULT_MESSAGE . sprintf(self::MESSAGE_EXTENSION_FOR_STRING_FORMAT, $string);

        return new static($message, $code, $previous);
    }
public static function forString($string, $code = self::CODE_FOR_STRING, Exception $previous = null)
    {
        $message = self::DEFAULT_MESSAGE . sprintf(self::MESSAGE_EXTENSION_FOR_STRING_FORMAT, $string);

        return new static($message, $code, $previous);
    }
public static function forString ( $ string , $ code = self :: CODE_FOR_STRING , Exception $ previous = null ) { $ message = self :: DEFAULT_MESSAGE . sprintf ( self :: MESSAGE_EXTENSION_FOR_STRING_FORMAT , $ string ) ; return new static ( $ message , $ code , $ previous ) ; }
Creates an exception instance for a given string.

@param string $string The string that failed to convert the encoding of.
@param int $code The exception code.
@param Exception|null $previous A previous exception used for chaining.
@return static
Creates an exception instance for a given string .