Skip to content

Commit cd85076

Browse files
sax0n0xasa.popov
andauthored
PHP 8.4 fixes (#284)
Co-authored-by: a.popov <a.popov@b2b-center.ru>
1 parent 7988538 commit cd85076

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/API.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class API
2222
'version' => ExchangeWebServices::VERSION_2010
2323
);
2424

25-
public function __construct(ExchangeWebServices $client = null)
25+
public function __construct(?ExchangeWebServices $client = null)
2626
{
2727
if ($client) {
2828
$this->setClient($client);
@@ -180,7 +180,7 @@ public function updateItems($items, $options = array())
180180
return Utilities\ensureIsArray($response);
181181
}
182182

183-
public function createCalendars($names, BaseFolderIdType $parentFolder = null, $options = array())
183+
public function createCalendars($names, ?BaseFolderIdType $parentFolder = null, $options = array())
184184
{
185185
if ($parentFolder === null) {
186186
$parentFolder = $this->getDistinguishedFolderId('calendar');
@@ -189,7 +189,7 @@ public function createCalendars($names, BaseFolderIdType $parentFolder = null, $
189189
return $this->createFolders($names, $parentFolder, $options, 'IPF.Appointment');
190190
}
191191

192-
public function createContactsFolder($names, BaseFolderIdType $parentFolder = null, $options = array())
192+
public function createContactsFolder($names, ?BaseFolderIdType $parentFolder = null, $options = array())
193193
{
194194
if ($parentFolder === null) {
195195
$parentFolder = $this->getDistinguishedFolderId('contacts');

src/API/Exception/ExchangeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ExchangeException extends API\Exception
1313
*/
1414
private $response;
1515

16-
public function __construct(ResponseMessageType $response, $code = 0, Throwable $previous = null)
16+
public function __construct(ResponseMessageType $response, $code = 0, ?Throwable $previous = null)
1717
{
1818
$this->response = $response;
1919
parent::__construct($response->getMessageText(), $code, $previous);

src/API/Type/DistinguishedFolderIdType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class DistinguishedFolderIdType extends BaseFolderIdType
2626
*/
2727
protected $mailbox = null;
2828

29-
public function __construct($id = null, $changeKey = null, EmailAddressType $mailbox = null)
29+
public function __construct($id = null, $changeKey = null, ?EmailAddressType $mailbox = null)
3030
{
3131
$this->id = $id;
3232
$this->changeKey = $changeKey;

0 commit comments

Comments
 (0)