public static function invalidArgument(
        string $class,
        string $method,
        string $arg,
        \Exception $previous = null
    ): self {
        return new self(
            "invalid value of argument \"{$arg}\" in {$class}::{$method}",
            self::INVALID_ARGUMENT,
            $previous
        );
    }
public static function invalidArgument(
        string $class,
        string $method,
        string $arg,
        \Exception $previous = null
    ): self {
        return new self(
            "invalid value of argument \"{$arg}\" in {$class}::{$method}",
            self::INVALID_ARGUMENT,
            $previous
        );
    }
public static function invalidArgument ( string $ class , string $ method , string $ arg , \ Exception $ previous = null ) : self { return new self ( "invalid value of argument \"{$arg}\" in {$class}::{$method}" , self :: INVALID_ARGUMENT , $ previous ) ; }
Creates an exception if an invalid argument was given in a method call.

@param string $class
The containing class
@param string $method
The method's name
@param string $arg
The argument's name
@param \Exception|null $previous
Previous exception
@return \Gustav\Utils\InvalidArgumentException
The exception
Creates an exception if an invalid argument was given in a method call .