Not those variables, the ones you use in the line
$SNClient = new ServiceNowClient($instance, $username, $password);
Where do those variables get their values from?
You know, that encourages asking the question. If they "get their values" here:
private $instance = "xx";
private $username = "xx";
private $password = "xx";
Then why is changing them literally the first thing you do when creating the object?
$this->instance = $instance;
$this->username = $username;
$this->password = $password;
Like, what are you changing them to and what was the point of giving them values back when you declared them?
Indeed, it looks like back when the comment on the constructor was written, you didn't have to supply anything:
/* Constructor of the class
* Required to get credentials to use authentification on Service-Now.
* Example: $SNClient = new ServiceNowClient();
*/
But since then the code has been changed:
public function __construct($instance, $username, $password){
and now you do have to supply those values. So you write:
$SNClient = new ServiceNowClient($instance, $username, $password);
and apparently you're now having trouble figuring out what $instance
, $username
, and $password
here are supposed to be.