Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More PHP 8.4 fixes #484

Merged
merged 1 commit into from
Nov 26, 2024
Merged
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
4 changes: 1 addition & 3 deletions src/Endpoints/Code.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ public function switch(string $environmentUuid, string $branch): OperationRespon

/**
* Deploys code from one environment to another environment.
*
* @param string|null $commitMessage
*/
public function deploy(
string $environmentFromUuid,
string $environmentToUuid,
string $commitMessage = null
?string $commitMessage = null
): OperationResponse {

$options = [
Expand Down
8 changes: 2 additions & 6 deletions src/Endpoints/Crons.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@ public function get(string $environmentUuid, int $cronId): CronResponse

/**
* Add a cron task.
*
* @param string|null $serverId
*/
public function create(
string $environmentUuid,
string $command,
string $frequency,
string $label,
string $serverId = null
?string $serverId = null
): OperationResponse {

$options = [
Expand All @@ -73,16 +71,14 @@ public function create(

/**
* Update a cron task.
*
* @param string|null $serverId
*/
public function update(
string $environmentUuid,
string $cronId,
string $command,
string $frequency,
string $label,
string $serverId = null
?string $serverId = null
): OperationResponse {

$options = [
Expand Down
3 changes: 1 addition & 2 deletions src/Endpoints/Roles.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,12 @@ public function get(string $roleUuid): RoleResponse
* Create a new role.
*
* @param array<string> $permissions
* @param string|null $description
*/
public function create(
string $organizationUuid,
string $name,
array $permissions,
string $description = null
?string $description = null
): OperationResponse {
$options = [
'json' => [
Expand Down
7 changes: 2 additions & 5 deletions src/Endpoints/SslCertificates.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,14 @@ public function get(string $environmentUuid, int $certificateId): SslCertificate

/**
* Install an SSL certificate.
*
* @param string|null $ca
* @param int|null $csr
*/
public function create(
string $envUuid,
string $label,
string $cert,
string $key,
string $ca = null,
int $csr = null,
?string $ca = null,
?int $csr = null,
bool $legacy = false
): OperationResponse {

Expand Down
2 changes: 1 addition & 1 deletion src/Exception/ApiErrorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ApiErrorException extends Exception
/**
* ApiErrorException Constructor.
*/
public function __construct(object $response_body, string $message = "", int $code = 0, Exception $previous = null)
public function __construct(object $response_body, string $message = "", int $code = 0, ?Exception $previous = null)
{
parent::__construct($message, $code, $previous);

Expand Down