public static function GetDirectLoginUser($username, $password)
{
if (!is_string($username))
{
throw new InvalidArgumentException('Usernames must be strings.');
}
if (!is_string($password))
{
throw new InvalidArgumentException('Passwords must be strings.');
}
This is fine for two arguments… but for e.g. 7 arguments it becomes ridiculous. Is there a better way of handling that?
Don’t check. Caller beware.