Skip to content

Commit 374956d

Browse files
committed
close #21
1 parent a5d32e3 commit 374956d

File tree

7 files changed

+19
-7
lines changed

7 files changed

+19
-7
lines changed

src/Exception/ForbiddenIpException.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
class ForbiddenIpException extends Exception
88
{
9-
public function __construct($message = 'The server IP is not included in the list of permitted IP addresses', $code = 903, ?Exception $previous = null)
9+
public function __construct(
10+
$message = 'The server IP is not included in the list of permitted IP addresses',
11+
$code = 903,
12+
?Exception $previous = null
13+
)
1014
{
1115
parent::__construct($message, $code, $previous);
1216
}

src/Exception/InvalidOptionalArgumentException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class InvalidOptionalArgumentException extends Exception
88
{
9-
public function __construct($message, $code = 0, Exception $previous = null)
9+
public function __construct($message, $code = 0, ?Exception $previous = null)
1010
{
1111
parent::__construct($message, $code, $previous);
1212
}

src/Exception/InvalidRequiredArgumentException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class InvalidRequiredArgumentException extends Exception
88
{
9-
public function __construct($message, $code = 0, Exception $previous = null)
9+
public function __construct($message, $code = 0, ?Exception $previous = null)
1010
{
1111
parent::__construct($message, $code, $previous);
1212
}

src/Exception/MissingAccessRightsException.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
class MissingAccessRightsException extends Exception
88
{
9-
public function __construct($message = 'The API key does not have access rights to this endpoint.', $code = 902, ?Exception $previous = null)
9+
public function __construct(
10+
$message = 'The API key does not have access rights to this endpoint.',
11+
$code = 902,
12+
?Exception $previous = null
13+
)
1014
{
1115
parent::__construct($message, $code, $previous);
1216
}

src/Exception/SigningHashVerificationException.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
class SigningHashVerificationException extends Exception
88
{
9-
public function __construct($message = 'Verification of the signing hash failed', $code = 901, ?Exception $previous = null)
9+
public function __construct(
10+
$message = 'Verification of the signing hash failed',
11+
$code = 901,
12+
?Exception $previous = null
13+
)
1014
{
1115
parent::__construct($message, $code, $previous);
1216
}

src/Exception/UnknownOptionException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class UnknownOptionException extends Exception
88
{
9-
public function __construct($message, $code = 0, Exception $previous = null)
9+
public function __construct($message, $code = 0, ?Exception $previous = null)
1010
{
1111
parent::__construct($message, $code, $previous);
1212
}

src/Resource/Subaccounts/SubaccountsResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function delete(int $id): SubaccountDelete {
3737
* @throws SigningHashVerificationException
3838
* @throws UnexpectedApiResponseException
3939
*/
40-
public function read(int $id = null): array {
40+
public function read(?int $id = null): array {
4141
if ($id !== null && $id < 1) throw new InvalidRequiredArgumentException('Argument \'id\' must be > 0.');
4242
$arr = $this->client->get('subaccounts', ['action' => 'read', 'id' => $id]);
4343
return array_map(static fn(object $obj) => new Subaccount($obj), $arr);

0 commit comments

Comments
 (0)