From 236903f61c57e193bb9431cc81b286139fa8faf3 Mon Sep 17 00:00:00 2001 From: cybd Date: Fri, 24 Jan 2025 22:05:09 +0200 Subject: [PATCH 1/2] Fix PHP 8.4 deprecation --- lib/Api/DomainsApi.php | 6 +++--- lib/Api/EmailsApi.php | 6 +++--- lib/Api/FilesApi.php | 8 ++++---- lib/Api/InboundRouteApi.php | 6 +++--- lib/Api/SegmentsApi.php | 6 +++--- lib/Api/SuppressionsApi.php | 6 +++--- lib/Api/VerificationsApi.php | 6 +++--- lib/Configuration.php | 2 +- lib/Model/ApiKey.php | 2 +- lib/Model/ApiKeyPayload.php | 2 +- lib/Model/BodyPart.php | 2 +- lib/Model/Campaign.php | 2 +- lib/Model/CampaignOptions.php | 2 +- lib/Model/CampaignRecipient.php | 2 +- lib/Model/CampaignTemplate.php | 2 +- lib/Model/ChannelLogStatusSummary.php | 2 +- lib/Model/ConsentData.php | 2 +- lib/Model/Contact.php | 2 +- lib/Model/ContactActivity.php | 2 +- lib/Model/ContactPayload.php | 2 +- lib/Model/ContactUpdatePayload.php | 2 +- lib/Model/ContactsList.php | 2 +- lib/Model/DomainData.php | 2 +- lib/Model/DomainDetail.php | 2 +- lib/Model/DomainPayload.php | 2 +- lib/Model/DomainUpdatePayload.php | 2 +- lib/Model/EmailContent.php | 2 +- lib/Model/EmailData.php | 2 +- lib/Model/EmailJobFailedStatus.php | 2 +- lib/Model/EmailJobStatus.php | 2 +- lib/Model/EmailMessageData.php | 2 +- lib/Model/EmailRecipient.php | 2 +- lib/Model/EmailSend.php | 2 +- lib/Model/EmailStatus.php | 2 +- lib/Model/EmailTransactionalMessageData.php | 2 +- lib/Model/EmailValidationResult.php | 2 +- lib/Model/EmailView.php | 2 +- lib/Model/EmailsPayload.php | 2 +- lib/Model/ExportLink.php | 2 +- lib/Model/FileInfo.php | 2 +- lib/Model/FilePayload.php | 2 +- lib/Model/FileUploadResult.php | 2 +- lib/Model/InboundPayload.php | 2 +- lib/Model/InboundRoute.php | 2 +- lib/Model/ListPayload.php | 2 +- lib/Model/ListUpdatePayload.php | 2 +- lib/Model/LogStatusSummary.php | 2 +- lib/Model/MergeEmailPayload.php | 2 +- lib/Model/MessageAttachment.php | 2 +- lib/Model/NewApiKey.php | 2 +- lib/Model/NewSmtpCredentials.php | 2 +- lib/Model/Options.php | 2 +- lib/Model/RecipientEvent.php | 2 +- lib/Model/Segment.php | 2 +- lib/Model/SegmentPayload.php | 2 +- lib/Model/SmtpCredentials.php | 2 +- lib/Model/SmtpCredentialsPayload.php | 2 +- lib/Model/SortOrderItem.php | 2 +- lib/Model/SplitOptions.php | 2 +- lib/Model/SubAccountInfo.php | 2 +- lib/Model/SubaccountEmailCreditsPayload.php | 2 +- lib/Model/SubaccountEmailSettings.php | 2 +- lib/Model/SubaccountEmailSettingsPayload.php | 2 +- lib/Model/SubaccountPayload.php | 2 +- lib/Model/SubaccountSettingsInfo.php | 2 +- lib/Model/SubaccountSettingsInfoPayload.php | 2 +- lib/Model/Suppression.php | 2 +- lib/Model/Template.php | 2 +- lib/Model/TemplatePayload.php | 2 +- lib/Model/TransactionalRecipient.php | 2 +- lib/Model/Utm.php | 2 +- lib/Model/VerificationFileResult.php | 2 +- lib/Model/VerificationFileResultDetails.php | 2 +- 73 files changed, 88 insertions(+), 88 deletions(-) diff --git a/lib/Api/DomainsApi.php b/lib/Api/DomainsApi.php index bd94b89..ba1503d 100644 --- a/lib/Api/DomainsApi.php +++ b/lib/Api/DomainsApi.php @@ -105,9 +105,9 @@ class DomainsApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/lib/Api/EmailsApi.php b/lib/Api/EmailsApi.php index 0db4bb8..b306445 100644 --- a/lib/Api/EmailsApi.php +++ b/lib/Api/EmailsApi.php @@ -96,9 +96,9 @@ class EmailsApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/lib/Api/FilesApi.php b/lib/Api/FilesApi.php index f20a1f8..7b9192c 100644 --- a/lib/Api/FilesApi.php +++ b/lib/Api/FilesApi.php @@ -96,9 +96,9 @@ class FilesApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -1006,7 +1006,7 @@ public function filesByNameInfoGetRequest($name, string $contentType = self::con * @throws \InvalidArgumentException * @return \ElasticEmail\Model\FileInfo[] */ - public function filesGet($limit = null, $offset = null, string $contentType = self::contentTypes['filesGet'][0]) + public function filesGet(?$limit = null, ?$offset = null, string $contentType = self::contentTypes['filesGet'][0]) { list($response) = $this->filesGetWithHttpInfo($limit, $offset, $contentType); return $response; diff --git a/lib/Api/InboundRouteApi.php b/lib/Api/InboundRouteApi.php index c10b122..be36c0d 100644 --- a/lib/Api/InboundRouteApi.php +++ b/lib/Api/InboundRouteApi.php @@ -99,9 +99,9 @@ class InboundRouteApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/lib/Api/SegmentsApi.php b/lib/Api/SegmentsApi.php index 38ba539..1c71f9b 100644 --- a/lib/Api/SegmentsApi.php +++ b/lib/Api/SegmentsApi.php @@ -96,9 +96,9 @@ class SegmentsApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/lib/Api/SuppressionsApi.php b/lib/Api/SuppressionsApi.php index cf478e3..165c9bf 100644 --- a/lib/Api/SuppressionsApi.php +++ b/lib/Api/SuppressionsApi.php @@ -117,9 +117,9 @@ class SuppressionsApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/lib/Api/VerificationsApi.php b/lib/Api/VerificationsApi.php index 4542b62..79d43b7 100644 --- a/lib/Api/VerificationsApi.php +++ b/lib/Api/VerificationsApi.php @@ -111,9 +111,9 @@ class VerificationsApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/lib/Configuration.php b/lib/Configuration.php index dfccf5b..0fe4405 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -488,7 +488,7 @@ public function getHostSettings() * @param array|null $variables hash of variable and the corresponding value (optional) * @return string URL based on host settings */ - public static function getHostString(array $hostSettings, $hostIndex, array $variables = null) + public static function getHostString(array $hostSettings, $hostIndex, ?array $variables = null) { if (null === $variables) { $variables = []; diff --git a/lib/Model/ApiKey.php b/lib/Model/ApiKey.php index f649677..7905052 100644 --- a/lib/Model/ApiKey.php +++ b/lib/Model/ApiKey.php @@ -274,7 +274,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('access_level', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/lib/Model/ApiKeyPayload.php b/lib/Model/ApiKeyPayload.php index 19ccf9d..f9af9d7 100644 --- a/lib/Model/ApiKeyPayload.php +++ b/lib/Model/ApiKeyPayload.php @@ -268,7 +268,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('access_level', $data ?? [], null); diff --git a/lib/Model/BodyPart.php b/lib/Model/BodyPart.php index c77cf40..5c356ff 100644 --- a/lib/Model/BodyPart.php +++ b/lib/Model/BodyPart.php @@ -256,7 +256,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('content_type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); diff --git a/lib/Model/Campaign.php b/lib/Model/Campaign.php index 970ad58..bf73e41 100644 --- a/lib/Model/Campaign.php +++ b/lib/Model/Campaign.php @@ -267,7 +267,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('content', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/lib/Model/CampaignOptions.php b/lib/Model/CampaignOptions.php index e4d3823..b966734 100644 --- a/lib/Model/CampaignOptions.php +++ b/lib/Model/CampaignOptions.php @@ -280,7 +280,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('delivery_optimization', $data ?? [], null); $this->setIfExists('track_opens', $data ?? [], null); diff --git a/lib/Model/CampaignRecipient.php b/lib/Model/CampaignRecipient.php index f02eaf2..6c06525 100644 --- a/lib/Model/CampaignRecipient.php +++ b/lib/Model/CampaignRecipient.php @@ -250,7 +250,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('list_names', $data ?? [], null); $this->setIfExists('segment_names', $data ?? [], null); diff --git a/lib/Model/CampaignTemplate.php b/lib/Model/CampaignTemplate.php index 95eb7fe..40ba5d8 100644 --- a/lib/Model/CampaignTemplate.php +++ b/lib/Model/CampaignTemplate.php @@ -280,7 +280,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('poolname', $data ?? [], null); $this->setIfExists('from', $data ?? [], null); diff --git a/lib/Model/ChannelLogStatusSummary.php b/lib/Model/ChannelLogStatusSummary.php index ed23a9f..5e38a09 100644 --- a/lib/Model/ChannelLogStatusSummary.php +++ b/lib/Model/ChannelLogStatusSummary.php @@ -322,7 +322,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('channel_name', $data ?? [], null); $this->setIfExists('recipients', $data ?? [], null); diff --git a/lib/Model/ConsentData.php b/lib/Model/ConsentData.php index dcc54a9..12667e5 100644 --- a/lib/Model/ConsentData.php +++ b/lib/Model/ConsentData.php @@ -255,7 +255,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('consent_ip', $data ?? [], null); $this->setIfExists('consent_date', $data ?? [], null); diff --git a/lib/Model/Contact.php b/lib/Model/Contact.php index 617517b..cc5f76a 100644 --- a/lib/Model/Contact.php +++ b/lib/Model/Contact.php @@ -304,7 +304,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); diff --git a/lib/Model/ContactActivity.php b/lib/Model/ContactActivity.php index 9070bac..226d015 100644 --- a/lib/Model/ContactActivity.php +++ b/lib/Model/ContactActivity.php @@ -303,7 +303,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('total_sent', $data ?? [], null); $this->setIfExists('total_opened', $data ?? [], null); diff --git a/lib/Model/ContactPayload.php b/lib/Model/ContactPayload.php index 324b69e..a2ebe88 100644 --- a/lib/Model/ContactPayload.php +++ b/lib/Model/ContactPayload.php @@ -273,7 +273,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); diff --git a/lib/Model/ContactUpdatePayload.php b/lib/Model/ContactUpdatePayload.php index 5ec1c21..fb5037c 100644 --- a/lib/Model/ContactUpdatePayload.php +++ b/lib/Model/ContactUpdatePayload.php @@ -255,7 +255,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('first_name', $data ?? [], null); $this->setIfExists('last_name', $data ?? [], null); diff --git a/lib/Model/ContactsList.php b/lib/Model/ContactsList.php index b76251b..fa15de2 100644 --- a/lib/Model/ContactsList.php +++ b/lib/Model/ContactsList.php @@ -262,7 +262,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('list_name', $data ?? [], null); $this->setIfExists('public_list_id', $data ?? [], null); diff --git a/lib/Model/DomainData.php b/lib/Model/DomainData.php index a5a46e6..b80dd30 100644 --- a/lib/Model/DomainData.php +++ b/lib/Model/DomainData.php @@ -352,7 +352,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('validation_log', $data ?? [], null); $this->setIfExists('domain', $data ?? [], null); diff --git a/lib/Model/DomainDetail.php b/lib/Model/DomainDetail.php index aaf24b5..407809f 100644 --- a/lib/Model/DomainDetail.php +++ b/lib/Model/DomainDetail.php @@ -346,7 +346,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('domain', $data ?? [], null); $this->setIfExists('default_domain', $data ?? [], null); diff --git a/lib/Model/DomainPayload.php b/lib/Model/DomainPayload.php index 3ed2653..59eede7 100644 --- a/lib/Model/DomainPayload.php +++ b/lib/Model/DomainPayload.php @@ -249,7 +249,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('domain', $data ?? [], null); $this->setIfExists('set_as_default', $data ?? [], null); diff --git a/lib/Model/DomainUpdatePayload.php b/lib/Model/DomainUpdatePayload.php index a0d6662..53daad8 100644 --- a/lib/Model/DomainUpdatePayload.php +++ b/lib/Model/DomainUpdatePayload.php @@ -261,7 +261,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('certificate_status', $data ?? [], null); $this->setIfExists('verp', $data ?? [], null); diff --git a/lib/Model/EmailContent.php b/lib/Model/EmailContent.php index c2154ec..7eb7d6f 100644 --- a/lib/Model/EmailContent.php +++ b/lib/Model/EmailContent.php @@ -310,7 +310,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('body', $data ?? [], null); $this->setIfExists('merge', $data ?? [], null); diff --git a/lib/Model/EmailData.php b/lib/Model/EmailData.php index 71f68d3..4870c60 100644 --- a/lib/Model/EmailData.php +++ b/lib/Model/EmailData.php @@ -255,7 +255,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('preview', $data ?? [], null); $this->setIfExists('attachments', $data ?? [], null); diff --git a/lib/Model/EmailJobFailedStatus.php b/lib/Model/EmailJobFailedStatus.php index 6c73b3a..e172610 100644 --- a/lib/Model/EmailJobFailedStatus.php +++ b/lib/Model/EmailJobFailedStatus.php @@ -261,7 +261,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('address', $data ?? [], null); $this->setIfExists('error', $data ?? [], null); diff --git a/lib/Model/EmailJobStatus.php b/lib/Model/EmailJobStatus.php index c444da8..bd05372 100644 --- a/lib/Model/EmailJobStatus.php +++ b/lib/Model/EmailJobStatus.php @@ -357,7 +357,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); diff --git a/lib/Model/EmailMessageData.php b/lib/Model/EmailMessageData.php index 39e9f94..cf5763c 100644 --- a/lib/Model/EmailMessageData.php +++ b/lib/Model/EmailMessageData.php @@ -256,7 +256,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('recipients', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); diff --git a/lib/Model/EmailRecipient.php b/lib/Model/EmailRecipient.php index fadaa77..e87aff3 100644 --- a/lib/Model/EmailRecipient.php +++ b/lib/Model/EmailRecipient.php @@ -250,7 +250,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email', $data ?? [], null); $this->setIfExists('fields', $data ?? [], null); diff --git a/lib/Model/EmailSend.php b/lib/Model/EmailSend.php index 2f27a1b..a84cd80 100644 --- a/lib/Model/EmailSend.php +++ b/lib/Model/EmailSend.php @@ -249,7 +249,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('transaction_id', $data ?? [], null); $this->setIfExists('message_id', $data ?? [], null); diff --git a/lib/Model/EmailStatus.php b/lib/Model/EmailStatus.php index 4b125d3..587aeea 100644 --- a/lib/Model/EmailStatus.php +++ b/lib/Model/EmailStatus.php @@ -316,7 +316,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('from', $data ?? [], null); $this->setIfExists('to', $data ?? [], null); diff --git a/lib/Model/EmailTransactionalMessageData.php b/lib/Model/EmailTransactionalMessageData.php index 4bcf4ac..0a69863 100644 --- a/lib/Model/EmailTransactionalMessageData.php +++ b/lib/Model/EmailTransactionalMessageData.php @@ -256,7 +256,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('recipients', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); diff --git a/lib/Model/EmailValidationResult.php b/lib/Model/EmailValidationResult.php index 6732036..fb8966b 100644 --- a/lib/Model/EmailValidationResult.php +++ b/lib/Model/EmailValidationResult.php @@ -303,7 +303,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account', $data ?? [], null); $this->setIfExists('domain', $data ?? [], null); diff --git a/lib/Model/EmailView.php b/lib/Model/EmailView.php index e25a428..234d9f4 100644 --- a/lib/Model/EmailView.php +++ b/lib/Model/EmailView.php @@ -256,7 +256,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('body', $data ?? [], null); $this->setIfExists('subject', $data ?? [], null); diff --git a/lib/Model/EmailsPayload.php b/lib/Model/EmailsPayload.php index 840e1ba..e6f50a6 100644 --- a/lib/Model/EmailsPayload.php +++ b/lib/Model/EmailsPayload.php @@ -250,7 +250,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('rule', $data ?? [], null); $this->setIfExists('emails', $data ?? [], null); diff --git a/lib/Model/ExportLink.php b/lib/Model/ExportLink.php index 7526c88..83b068b 100644 --- a/lib/Model/ExportLink.php +++ b/lib/Model/ExportLink.php @@ -249,7 +249,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('link', $data ?? [], null); $this->setIfExists('public_export_id', $data ?? [], null); diff --git a/lib/Model/FileInfo.php b/lib/Model/FileInfo.php index dc9cde4..4d2fbff 100644 --- a/lib/Model/FileInfo.php +++ b/lib/Model/FileInfo.php @@ -268,7 +268,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('file_name', $data ?? [], null); $this->setIfExists('size', $data ?? [], null); diff --git a/lib/Model/FilePayload.php b/lib/Model/FilePayload.php index 577d810..37ca2b2 100644 --- a/lib/Model/FilePayload.php +++ b/lib/Model/FilePayload.php @@ -255,7 +255,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('binary_content', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/lib/Model/FileUploadResult.php b/lib/Model/FileUploadResult.php index 4db267f..90e1d41 100644 --- a/lib/Model/FileUploadResult.php +++ b/lib/Model/FileUploadResult.php @@ -249,7 +249,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('emails_count', $data ?? [], null); $this->setIfExists('duplicated_emails_count', $data ?? [], null); diff --git a/lib/Model/InboundPayload.php b/lib/Model/InboundPayload.php index 71cf4f6..a0a0289 100644 --- a/lib/Model/InboundPayload.php +++ b/lib/Model/InboundPayload.php @@ -273,7 +273,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('filter', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/lib/Model/InboundRoute.php b/lib/Model/InboundRoute.php index cd5f5ef..0e3adbd 100644 --- a/lib/Model/InboundRoute.php +++ b/lib/Model/InboundRoute.php @@ -279,7 +279,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('public_id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/lib/Model/ListPayload.php b/lib/Model/ListPayload.php index 8531c86..e49092a 100644 --- a/lib/Model/ListPayload.php +++ b/lib/Model/ListPayload.php @@ -255,7 +255,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('list_name', $data ?? [], null); $this->setIfExists('allow_unsubscribe', $data ?? [], null); diff --git a/lib/Model/ListUpdatePayload.php b/lib/Model/ListUpdatePayload.php index e2b8a9f..2f58166 100644 --- a/lib/Model/ListUpdatePayload.php +++ b/lib/Model/ListUpdatePayload.php @@ -249,7 +249,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('new_list_name', $data ?? [], null); $this->setIfExists('allow_unsubscribe', $data ?? [], null); diff --git a/lib/Model/LogStatusSummary.php b/lib/Model/LogStatusSummary.php index 510fcb1..bee25ce 100644 --- a/lib/Model/LogStatusSummary.php +++ b/lib/Model/LogStatusSummary.php @@ -316,7 +316,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('recipients', $data ?? [], null); $this->setIfExists('email_total', $data ?? [], null); diff --git a/lib/Model/MergeEmailPayload.php b/lib/Model/MergeEmailPayload.php index 4217dcc..c5de8d4 100644 --- a/lib/Model/MergeEmailPayload.php +++ b/lib/Model/MergeEmailPayload.php @@ -255,7 +255,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('merge_file', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); diff --git a/lib/Model/MessageAttachment.php b/lib/Model/MessageAttachment.php index f140e2a..28b9949 100644 --- a/lib/Model/MessageAttachment.php +++ b/lib/Model/MessageAttachment.php @@ -261,7 +261,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('binary_content', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/lib/Model/NewApiKey.php b/lib/Model/NewApiKey.php index 0d96e71..07363e9 100644 --- a/lib/Model/NewApiKey.php +++ b/lib/Model/NewApiKey.php @@ -280,7 +280,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('token', $data ?? [], null); $this->setIfExists('access_level', $data ?? [], null); diff --git a/lib/Model/NewSmtpCredentials.php b/lib/Model/NewSmtpCredentials.php index 615e994..5a6104d 100644 --- a/lib/Model/NewSmtpCredentials.php +++ b/lib/Model/NewSmtpCredentials.php @@ -280,7 +280,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('token', $data ?? [], null); $this->setIfExists('access_level', $data ?? [], null); diff --git a/lib/Model/Options.php b/lib/Model/Options.php index 870336f..73b65ae 100644 --- a/lib/Model/Options.php +++ b/lib/Model/Options.php @@ -274,7 +274,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('time_offset', $data ?? [], null); $this->setIfExists('pool_name', $data ?? [], null); diff --git a/lib/Model/RecipientEvent.php b/lib/Model/RecipientEvent.php index 32ac3be..df1ceb8 100644 --- a/lib/Model/RecipientEvent.php +++ b/lib/Model/RecipientEvent.php @@ -316,7 +316,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('transaction_id', $data ?? [], null); $this->setIfExists('msg_id', $data ?? [], null); diff --git a/lib/Model/Segment.php b/lib/Model/Segment.php index 990a3cc..3e9af4a 100644 --- a/lib/Model/Segment.php +++ b/lib/Model/Segment.php @@ -250,7 +250,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('rule', $data ?? [], null); diff --git a/lib/Model/SegmentPayload.php b/lib/Model/SegmentPayload.php index 0290a94..a08a3ac 100644 --- a/lib/Model/SegmentPayload.php +++ b/lib/Model/SegmentPayload.php @@ -249,7 +249,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('rule', $data ?? [], null); diff --git a/lib/Model/SmtpCredentials.php b/lib/Model/SmtpCredentials.php index 1098dda..0369097 100644 --- a/lib/Model/SmtpCredentials.php +++ b/lib/Model/SmtpCredentials.php @@ -274,7 +274,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('access_level', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/lib/Model/SmtpCredentialsPayload.php b/lib/Model/SmtpCredentialsPayload.php index fadd0a3..014df34 100644 --- a/lib/Model/SmtpCredentialsPayload.php +++ b/lib/Model/SmtpCredentialsPayload.php @@ -262,7 +262,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('expires', $data ?? [], null); diff --git a/lib/Model/SortOrderItem.php b/lib/Model/SortOrderItem.php index 9245405..add5d7a 100644 --- a/lib/Model/SortOrderItem.php +++ b/lib/Model/SortOrderItem.php @@ -250,7 +250,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('public_inbound_id', $data ?? [], null); $this->setIfExists('sort_order', $data ?? [], null); diff --git a/lib/Model/SplitOptions.php b/lib/Model/SplitOptions.php index 9ed79c4..c5d8890 100644 --- a/lib/Model/SplitOptions.php +++ b/lib/Model/SplitOptions.php @@ -250,7 +250,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('optimize_for', $data ?? [], null); $this->setIfExists('optimize_period_minutes', $data ?? [], null); diff --git a/lib/Model/SubAccountInfo.php b/lib/Model/SubAccountInfo.php index 718a5ed..96d6538 100644 --- a/lib/Model/SubAccountInfo.php +++ b/lib/Model/SubAccountInfo.php @@ -292,7 +292,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('public_account_id', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); diff --git a/lib/Model/SubaccountEmailCreditsPayload.php b/lib/Model/SubaccountEmailCreditsPayload.php index 325da1f..f687417 100644 --- a/lib/Model/SubaccountEmailCreditsPayload.php +++ b/lib/Model/SubaccountEmailCreditsPayload.php @@ -250,7 +250,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('credits', $data ?? [], null); $this->setIfExists('notes', $data ?? [], null); diff --git a/lib/Model/SubaccountEmailSettings.php b/lib/Model/SubaccountEmailSettings.php index 8945a57..305fdee 100644 --- a/lib/Model/SubaccountEmailSettings.php +++ b/lib/Model/SubaccountEmailSettings.php @@ -286,7 +286,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('monthly_refill_credits', $data ?? [], null); $this->setIfExists('requires_email_credits', $data ?? [], null); diff --git a/lib/Model/SubaccountEmailSettingsPayload.php b/lib/Model/SubaccountEmailSettingsPayload.php index 6998322..af67958 100644 --- a/lib/Model/SubaccountEmailSettingsPayload.php +++ b/lib/Model/SubaccountEmailSettingsPayload.php @@ -280,7 +280,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('requires_email_credits', $data ?? [], null); $this->setIfExists('email_size_limit', $data ?? [], null); diff --git a/lib/Model/SubaccountPayload.php b/lib/Model/SubaccountPayload.php index 3cad40d..23d0394 100644 --- a/lib/Model/SubaccountPayload.php +++ b/lib/Model/SubaccountPayload.php @@ -262,7 +262,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email', $data ?? [], null); $this->setIfExists('password', $data ?? [], null); diff --git a/lib/Model/SubaccountSettingsInfo.php b/lib/Model/SubaccountSettingsInfo.php index eb68787..70e8351 100644 --- a/lib/Model/SubaccountSettingsInfo.php +++ b/lib/Model/SubaccountSettingsInfo.php @@ -244,7 +244,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email', $data ?? [], null); } diff --git a/lib/Model/SubaccountSettingsInfoPayload.php b/lib/Model/SubaccountSettingsInfoPayload.php index e6918de..9ed8494 100644 --- a/lib/Model/SubaccountSettingsInfoPayload.php +++ b/lib/Model/SubaccountSettingsInfoPayload.php @@ -244,7 +244,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email', $data ?? [], null); } diff --git a/lib/Model/Suppression.php b/lib/Model/Suppression.php index db4273f..49c12b3 100644 --- a/lib/Model/Suppression.php +++ b/lib/Model/Suppression.php @@ -262,7 +262,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email', $data ?? [], null); $this->setIfExists('friendly_error_message', $data ?? [], null); diff --git a/lib/Model/Template.php b/lib/Model/Template.php index a20a159..d31b259 100644 --- a/lib/Model/Template.php +++ b/lib/Model/Template.php @@ -274,7 +274,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_type', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/lib/Model/TemplatePayload.php b/lib/Model/TemplatePayload.php index 0f9695a..8779304 100644 --- a/lib/Model/TemplatePayload.php +++ b/lib/Model/TemplatePayload.php @@ -262,7 +262,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('subject', $data ?? [], null); diff --git a/lib/Model/TransactionalRecipient.php b/lib/Model/TransactionalRecipient.php index c2323ed..789ca26 100644 --- a/lib/Model/TransactionalRecipient.php +++ b/lib/Model/TransactionalRecipient.php @@ -256,7 +256,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('to', $data ?? [], null); $this->setIfExists('cc', $data ?? [], null); diff --git a/lib/Model/Utm.php b/lib/Model/Utm.php index 5707eee..155d55c 100644 --- a/lib/Model/Utm.php +++ b/lib/Model/Utm.php @@ -262,7 +262,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('source', $data ?? [], null); $this->setIfExists('medium', $data ?? [], null); diff --git a/lib/Model/VerificationFileResult.php b/lib/Model/VerificationFileResult.php index 1b86b0e..9b8991a 100644 --- a/lib/Model/VerificationFileResult.php +++ b/lib/Model/VerificationFileResult.php @@ -274,7 +274,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('verification_id', $data ?? [], null); $this->setIfExists('filename', $data ?? [], null); diff --git a/lib/Model/VerificationFileResultDetails.php b/lib/Model/VerificationFileResultDetails.php index 8f98203..0114e59 100644 --- a/lib/Model/VerificationFileResultDetails.php +++ b/lib/Model/VerificationFileResultDetails.php @@ -280,7 +280,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('verification_result', $data ?? [], null); $this->setIfExists('verification_id', $data ?? [], null); From 1a77536436a8c4ef4d7644fef7be73d1d95c814f Mon Sep 17 00:00:00 2001 From: cybd Date: Fri, 24 Jan 2025 22:18:32 +0200 Subject: [PATCH 2/2] Fixed typo --- lib/Api/FilesApi.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Api/FilesApi.php b/lib/Api/FilesApi.php index 7b9192c..43b29f6 100644 --- a/lib/Api/FilesApi.php +++ b/lib/Api/FilesApi.php @@ -1006,7 +1006,7 @@ public function filesByNameInfoGetRequest($name, string $contentType = self::con * @throws \InvalidArgumentException * @return \ElasticEmail\Model\FileInfo[] */ - public function filesGet(?$limit = null, ?$offset = null, string $contentType = self::contentTypes['filesGet'][0]) + public function filesGet($limit = null, $offset = null, string $contentType = self::contentTypes['filesGet'][0]) { list($response) = $this->filesGetWithHttpInfo($limit, $offset, $contentType); return $response;