Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Models/exceptions/AuthExipredException.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

class AuthExipredException extends Exception
{
public function __construct($code = 0, Exception $previous = null)
public function __construct($code = 0, ?Exception $previous = null)
{
parent::__construct("Authentication Expired. Need to login again.", $code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Models/exceptions/CommandException.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

class CommandException extends Exception
{
public function __construct($error, $code = 0, Exception $previous = null)
public function __construct($error, $code = 0, ?Exception $previous = null)
{
parent::__construct($error, $code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Models/exceptions/RateLimitException.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

class RateLimitException extends Exception
{
public function __construct($code = 0, Exception $previous = null)
public function __construct($code = 0, ?Exception $previous = null)
{
parent::__construct("Too many requests. Please wait before calling again.", $code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Models/exceptions/UnderMaintenanceException.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

class UnderMaintenanceException extends Exception
{
public function __construct($code = 0, Exception $previous = null)
public function __construct($code = 0, ?Exception $previous = null)
{
parent::__construct("Copyleaks is Under Maintenance, please visit https://status.copyleaks.com", $code, $previous);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Models/submissions/properties/Scanning.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ class SubmissionScanning
*/
public function __construct(
bool $internet = false,
SubmissionScanningExclude $exclude = null,
array $repositories = null,
SubmissionScanningCopyleaksDB $copyleaksDb = null
?SubmissionScanningExclude $exclude = null,
?array $repositories = null,
?SubmissionScanningCopyleaksDB $copyleaksDb = null
) {
$this->internet = $internet;
$this->exclude = $exclude;
Expand Down
4 changes: 2 additions & 2 deletions src/Models/submissions/properties/Webhooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class SubmissionWebhooks
* @param string status This webhook event is triggered once the scan status changes. Use the special token {STATUS} to track the current scan status. This special token will automatically be replaced by the Copyleaks servers with the optional values: completed, error, creditsChecked and indexed. Read more about webhooks: https://api.copyleaks.com/documentation/v3/webhooks
* @param string newResult Http endpoint to be triggered while the scan is still running and a new result is found. This is useful when the report is being viewed by the user in real time so the results will load gradually as they are found.
*/
public function __construct(string $status, string $newResult = null)
public function __construct(string $status, ?string $newResult = null)
{
$this->newResult = $newResult;
$this->status = $status;
$this->status = $status;
}
}