Skip to content

Commit

Permalink
Bugfix: BootstrapEndpoint::logResponse(): Argument #1 ($logPath) must…
Browse files Browse the repository at this point in the history
… be of type string, null given
  • Loading branch information
Hodglim committed Apr 8, 2022
1 parent 0bda9cc commit 5e2856c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Client
/**
* @var string
*/
const version = '3.1.0';
const version = '3.1.1';

/**
* @var string
Expand All @@ -53,9 +53,9 @@ public function __construct($token, $logPath = '')
}

$this->token = $token;
$this->schools = new Schools($token);
$this->meta = new Meta($token);
$this->attendanceCodes = new AttendanceCodes($token);
$this->schools = new Schools($token, false, $logPath);
$this->meta = new Meta($token, false, $logPath);
$this->attendanceCodes = new AttendanceCodes($token, false, $logPath);
$this->logPath = $logPath;
}

Expand Down
13 changes: 7 additions & 6 deletions src/Endpoints/Assessment.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,19 @@ class Assessment extends BootstrapEndpoint
/**
* Assessment constructor.
*/
public function __construct($token, $id = false)
public function __construct($token, $id = false, $logPath = '')
{
$this->token = $token;
$this->logPath = $logPath;

if ($id) {
$this->uri = $this->uri . $id;
}

$this->templates = new Templates($token, $this->uri);
$this->aspects = new Aspects($token, $this->uri);
$this->marksheets = new MarkSheets($token, $this->uri);
$this->results = new Results($token, $this->uri);
$this->resultsets = new ResultSets($token, $this->uri);
$this->templates = new Templates($token, $this->uri, $this->logPath);
$this->aspects = new Aspects($token, $this->uri, $this->logPath);
$this->marksheets = new MarkSheets($token, $this->uri, $this->logPath);
$this->results = new Results($token, $this->uri, $this->logPath);
$this->resultsets = new ResultSets($token, $this->uri, $this->logPath);
}
}
2 changes: 1 addition & 1 deletion src/Endpoints/BootstrapEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class BootstrapEndpoint
/**
* @var string
*/
private $logPath;
private $logPath = '';

/**
* BootstrapEndpoint constructor.
Expand Down
2 changes: 1 addition & 1 deletion src/Endpoints/Schools.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class Schools extends BootstrapEndpoint
/**
* @var string
*/
private $logPath;
private $logPath = '';

/**
* Schools constructor.
Expand Down
2 changes: 1 addition & 1 deletion src/ResultIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ResultIterator extends BootstrapEndpoint implements \Iterator
/**
* @var string
*/
private $logPath;
private $logPath = '';

public function __construct($givenArray, $token, $logPath = '')
{
Expand Down

0 comments on commit 5e2856c

Please sign in to comment.