diff --git a/src/ApiClient.php b/src/ApiClient.php index 66210f5..7d0a3ff 100755 --- a/src/ApiClient.php +++ b/src/ApiClient.php @@ -57,7 +57,7 @@ class ApiClient implements ApiInterface * @param TokenStorageInterface|null $tokenStorage * @throws ApiClientException */ - public function __construct(string $userId, string $secret, TokenStorageInterface $tokenStorage = null) + public function __construct(string $userId, string $secret, ?TokenStorageInterface $tokenStorage = null) { if ($tokenStorage === null) { $tokenStorage = new FileStorage(); @@ -307,7 +307,7 @@ public function removeAddressBook(int $id): ?array * @deprecated * @see ApiClient::get() */ - public function listAddressBooks(int $limit = null, int $offset = null): ?array + public function listAddressBooks(?int $limit = null, ?int $offset = null): ?array { $data = array(); if (null !== $limit) { @@ -380,7 +380,7 @@ public function updateEmailVariables(int $bookID, string $email, array $vars): ? * @deprecated * @see ApiClient::get() */ - public function getEmailsFromBook(int $id, int $limit = null, int $offset = null): ?array + public function getEmailsFromBook(int $id, ?int $limit = null, ?int $offset = null): ?array { $data = []; if (null !== $limit) { @@ -477,7 +477,7 @@ public function campaignCost(int $bookID): ?array * @deprecated * @see ApiClient::get() */ - public function listCampaigns(int $limit = null, int $offset = null): ?array + public function listCampaigns(?int $limit = null, ?int $offset = null): ?array { $data = []; if (!empty($limit)) { @@ -563,7 +563,7 @@ public function createCampaign( string $type = '', bool $useTemplateId = false, string $sendDate = '', - int $segmentId = null, + ?int $segmentId = null, array $attachmentsBinary = [] ): ?array { @@ -884,7 +884,7 @@ public function smtpGetEmailInfoById($id): ?array * @deprecated * @see ApiClient::get() */ - public function smtpListUnsubscribed(int $limit = null, int $offset = null): ?array + public function smtpListUnsubscribed(?int $limit = null, ?int $offset = null): ?array { $data = array(); if (null !== $limit) { @@ -974,7 +974,7 @@ public function smtpSendMail(array $email): ?array * @deprecated * @see ApiClient::get() */ - public function pushListCampaigns(int $limit = null, int $offset = null): ?array + public function pushListCampaigns(?int $limit = null, ?int $offset = null): ?array { $data = []; if (null !== $limit) { @@ -997,7 +997,7 @@ public function pushListCampaigns(int $limit = null, int $offset = null): ?array * @deprecated * @see ApiClient::get() */ - public function pushListWebsites(int $limit = null, int $offset = null): ?array + public function pushListWebsites(?int $limit = null, ?int $offset = null): ?array { $data = array(); if (null !== $limit) { @@ -1048,7 +1048,7 @@ public function pushListWebsiteVariables(int $websiteId): ?array * @deprecated * @see ApiClient::get() */ - public function pushListWebsiteSubscriptions(int $websiteID, int $limit = null, int $offset = null): ?array + public function pushListWebsiteSubscriptions(int $websiteID, ?int $limit = null, ?int $offset = null): ?array { $data = []; if (null !== $limit) { diff --git a/src/ApiClientException.php b/src/ApiClientException.php index 1ddbcaf..ef42257 100755 --- a/src/ApiClientException.php +++ b/src/ApiClientException.php @@ -32,12 +32,12 @@ class ApiClientException extends Exception * @param string|null $curlErrors */ public function __construct( - string $message = "", - int $code = 0, - Throwable $previous = null, - array $responseBody = [], - string $headers = null, - string $curlErrors = null + string $message = "", + int $code = 0, + ?Throwable $previous = null, + array $responseBody = [], + ?string $headers = null, + ?string $curlErrors = null ) { $this->response = $responseBody;