Skip to content

Commit

Permalink
More PHP 8.4 fixes (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell authored Nov 26, 2024
1 parent c3acefe commit 52dd11b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 17 deletions.
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

0 comments on commit 52dd11b

Please sign in to comment.