Skip to content

Commit fbb71b4

Browse files
committed
Fixed PHP 8.4 deprecations
1 parent cc2e0ae commit fbb71b4

File tree

9 files changed

+20
-20
lines changed

9 files changed

+20
-20
lines changed

src/Api/Domain.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ public function show(string $domain, array $requestHeaders = [])
101101
*/
102102
public function create(
103103
string $domain,
104-
string $smtpPass = null,
105-
string $spamAction = null,
106-
bool $wildcard = null,
107-
bool $forceDkimAuthority = null,
104+
?string $smtpPass = null,
105+
?string $spamAction = null,
106+
?bool $wildcard = null,
107+
?bool $forceDkimAuthority = null,
108108
?array $ips = null,
109109
?string $pool_id = null,
110110
string $webScheme = 'http',

src/Api/DomainV4.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ public function show(string $domain, array $requestHeaders = [])
9999
*/
100100
public function create(
101101
string $domain,
102-
string $smtpPass = null,
103-
string $spamAction = null,
102+
?string $smtpPass = null,
103+
?string $spamAction = null,
104104
?bool $wildcard = null,
105105
?bool $forceDkimAuthority = null,
106106
?array $ips = null,

src/Api/MailingList/Member.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Member extends HttpApi
3939
* @return IndexResponse
4040
* @throws ClientExceptionInterface
4141
*/
42-
public function index(string $address, int $limit = 100, bool $subscribed = null, array $requestHeaders = [])
42+
public function index(string $address, int $limit = 100, ?bool $subscribed = null, array $requestHeaders = [])
4343
{
4444
Assert::stringNotEmpty($address);
4545
Assert::greaterThan($limit, 0);
@@ -92,7 +92,7 @@ public function show(string $list, string $address, array $requestHeaders = [])
9292
public function create(
9393
string $list,
9494
string $address,
95-
string $name = null,
95+
?string $name = null,
9696
array $vars = [],
9797
bool $subscribed = true,
9898
bool $upsert = false,

src/Api/Route.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ public function create(string $expression, array $actions, string $description,
107107
*/
108108
public function update(
109109
string $routeId,
110-
string $expression = null,
110+
?string $expression = null,
111111
array $actions = [],
112-
string $description = null,
113-
int $priority = null,
112+
?string $description = null,
113+
?int $priority = null,
114114
array $requestHeaders = []
115115
) {
116116
Assert::stringNotEmpty($routeId);

src/Api/Suppression/Complaint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function show(string $domain, string $address, array $requestHeaders = []
7373
* @return CreateResponse
7474
* @throws ClientExceptionInterface
7575
*/
76-
public function create(string $domain, string $address, string $createdAt = null, array $requestHeaders = [])
76+
public function create(string $domain, string $address, ?string $createdAt = null, array $requestHeaders = [])
7777
{
7878
Assert::stringNotEmpty($domain);
7979
Assert::stringNotEmpty($address);

src/Api/Suppression/Unsubscribe.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function create(string $domain, string $address, array $params = [], arra
9595
* @return DeleteResponse
9696
* @throws ClientExceptionInterface
9797
*/
98-
public function delete(string $domain, string $address, string $tag = null, array $requestHeaders = [])
98+
public function delete(string $domain, string $address, ?string $tag = null, array $requestHeaders = [])
9999
{
100100
Assert::stringNotEmpty($domain);
101101
Assert::stringNotEmpty($address);

src/Mailgun.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ class Mailgun
7777
*/
7878
public function __construct(
7979
HttpClientConfigurator $configurator,
80-
Hydrator $hydrator = null,
81-
RequestBuilder $requestBuilder = null
80+
?Hydrator $hydrator = null,
81+
?RequestBuilder $requestBuilder = null
8282
) {
8383
$this->requestBuilder = $requestBuilder ?: new RequestBuilder();
8484
$this->hydrator = $hydrator ?: new ModelHydrator();

src/Message/Exceptions/MissingRequiredParameter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class MissingRequiredParameter extends \Exception implements Exception
2020
* @param string|null $message
2121
* @return self
2222
*/
23-
public static function create(string $parameter, string $message = null)
23+
public static function create(string $parameter, ?string $message = null)
2424
{
2525
if (null === $message) {
2626
$message = 'The parameters passed to the API were invalid. Please specify "%s".';

src/Message/MessageBuilder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ public function setHtmlBody(string $htmlBody): self
318318
* @param string|null $attachmentName
319319
* @return $this
320320
*/
321-
public function addAttachment(string $attachmentPath, string $attachmentName = null): self
321+
public function addAttachment(string $attachmentPath, ?string $attachmentName = null): self
322322
{
323323
if (!isset($this->message['attachment'])) {
324324
$this->message['attachment'] = [];
@@ -337,7 +337,7 @@ public function addAttachment(string $attachmentPath, string $attachmentName = n
337337
* @param string|null $attachmentName
338338
* @return $this
339339
*/
340-
public function addStringAttachment(string $attachmentContent, string $attachmentName = null): self
340+
public function addStringAttachment(string $attachmentContent, ?string $attachmentName = null): self
341341
{
342342
if (!isset($this->message['attachment'])) {
343343
$this->message['attachment'] = [];
@@ -356,7 +356,7 @@ public function addStringAttachment(string $attachmentContent, string $attachmen
356356
* @param string|null $inlineImageName
357357
* @return $this
358358
*/
359-
public function addInlineImage(string $inlineImagePath, string $inlineImageName = null): self
359+
public function addInlineImage(string $inlineImagePath, ?string $inlineImageName = null): self
360360
{
361361
if (!isset($this->message['inline'])) {
362362
$this->message['inline'] = [];
@@ -466,7 +466,7 @@ public function setClickTracking(bool $enabled, bool $htmlOnly = false): self
466466
* @return $this
467467
* @throws \Exception
468468
*/
469-
public function setDeliveryTime(string $timeDate, string $timeZone = null): self
469+
public function setDeliveryTime(string $timeDate, ?string $timeZone = null): self
470470
{
471471
if (null !== $timeZone) {
472472
$timeZoneObj = new DateTimeZone($timeZone);

0 commit comments

Comments
 (0)