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
18 changes: 9 additions & 9 deletions src/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -563,7 +563,7 @@ public function createCampaign(
string $type = '',
bool $useTemplateId = false,
string $sendDate = '',
int $segmentId = null,
?int $segmentId = null,
array $attachmentsBinary = []
): ?array
{
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
12 changes: 6 additions & 6 deletions src/ApiClientException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down