Skip to content

Commit 226a638

Browse files
committed
set params to null by default for all the apis
1 parent e441f2e commit 226a638

16 files changed

+86
-85
lines changed

src/Parameters/CreateMeetingParameters.php

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ class CreateMeetingParameters extends MetaParameters
3030
/**
3131
* @var string
3232
*/
33-
private $meetingId;
33+
private ?string $meetingId=null;
3434

3535
/**
3636
* @var string
3737
*/
38-
private $meetingName;
38+
private ?string $meetingName =null;
3939

4040
/**
4141
* @var string
@@ -343,7 +343,7 @@ class CreateMeetingParameters extends MetaParameters
343343
* @param mixed $meetingId
344344
* @param mixed $meetingName
345345
*/
346-
public function __construct($meetingId, $meetingName)
346+
public function __construct($meetingId =null , $meetingName=null)
347347
{
348348
$this->meetingId = $meetingId;
349349
$this->meetingName = $meetingName;
@@ -1505,6 +1505,8 @@ public function setPresentationUploadExternalDescription(string $presentationUpl
15051505
*/
15061506
public function getHTTPQuery()
15071507
{
1508+
1509+
15081510
$queries = [
15091511
'name' => $this->meetingName,
15101512
'meetingID' => $this->meetingId,
@@ -1524,51 +1526,51 @@ public function getHTTPQuery()
15241526
'webcamsOnlyForModerator' => !is_null($this->webcamsOnlyForModerator) ? ($this->webcamsOnlyForModerator ? 'true' : 'false') : $this->webcamsOnlyForModerator,
15251527
'logo' => $this->logo,
15261528
'copyright' => $this->copyright,
1527-
'muteOnStart' => $this->muteOnStart ? 'true' : 'false',
1529+
'muteOnStart' => !is_null($this->muteOnStart) ? ($this->muteOnStart? 'true' : 'false'): $this->muteOnStart,
15281530
'guestPolicy' => $this->guestPolicy,
1529-
'lockSettingsDisableCam' => $this->lockSettingsDisableCam ? 'true' : 'false',
1530-
'lockSettingsDisableMic' => $this->lockSettingsDisableMic ? 'true' : 'false',
1531-
'lockSettingsDisablePrivateChat' => $this->lockSettingsDisablePrivateChat ? 'true' : 'false',
1532-
'lockSettingsDisablePublicChat' => $this->lockSettingsDisablePublicChat ? 'true' : 'false',
1533-
'lockSettingsDisableNote' => $this->lockSettingsDisableNote ? 'true' : 'false',
1534-
'lockSettingsHideUserList' => $this->lockSettingsHideUserList ? 'true' : 'false',
1535-
'lockSettingsLockedLayout' => $this->lockSettingsLockedLayout ? 'true' : 'false',
1536-
'lockSettingsLockOnJoin' => $this->lockSettingsLockOnJoin ? 'true' : 'false',
1537-
'lockSettingsLockOnJoinConfigurable' => $this->lockSettingsLockOnJoinConfigurable ? 'true' : 'false',
1538-
'lockSettingsHideViewersCursor' => $this->lockSettingsHideViewersCursor ? 'true' : 'false',
1539-
'allowModsToUnmuteUsers' => $this->allowModsToUnmuteUsers ? 'true' : 'false',
1540-
'allowModsToEjectCameras' => $this->allowModsToEjectCameras ? 'true' : 'false',
1531+
'lockSettingsDisableCam' => !is_null($this->lockSettingsDisableCam) ?($this->lockSettingsDisableCam?'true' : 'false') :$this->lockSettingsDisableCam,
1532+
'lockSettingsDisableMic' => !is_null($this->lockSettingsDisableMic) ?($this->lockSettingsDisableMic? 'true' : 'false'):$this->lockSettingsDisableMic,
1533+
'lockSettingsDisablePrivateChat' => !is_null($this->lockSettingsDisablePrivateChat) ? ($this->lockSettingsDisablePrivateChat ? 'true' : 'false'):$this->lockSettingsDisablePrivateChat,
1534+
'lockSettingsDisablePublicChat' => !is_null($this->lockSettingsDisablePublicChat) ? ($this->lockSettingsDisablePublicChat ?'true' : 'false'):$this->lockSettingsDisablePublicChat,
1535+
'lockSettingsDisableNote' => !is_null($this->lockSettingsDisableNote )? ($this->lockSettingsDisableNote ? 'true' : 'false'):$this->lockSettingsDisableNote,
1536+
'lockSettingsHideUserList' => !is_null($this->lockSettingsHideUserList)?($this->lockSettingsHideUserList ? 'true' : 'false'):$this->lockSettingsHideUserList,
1537+
'lockSettingsLockedLayout' => !is_null($this->lockSettingsLockedLayout)?($this->lockSettingsLockedLayout ? 'true' : 'false'):$this->lockSettingsLockedLayout,
1538+
'lockSettingsLockOnJoin' => !is_null($this->lockSettingsLockOnJoin )?($this->lockSettingsLockOnJoin ? 'true' : 'false'):$this->lockSettingsLockOnJoin ,
1539+
'lockSettingsLockOnJoinConfigurable' => !is_null($this->lockSettingsLockOnJoinConfigurable)?($this->lockSettingsLockOnJoinConfigurable ? 'true' : 'false'):$this->lockSettingsLockOnJoinConfigurable,
1540+
'lockSettingsHideViewersCursor' => !is_null($this->lockSettingsHideViewersCursor)?($this->lockSettingsHideViewersCursor ? 'true' : 'false'):$this->lockSettingsHideViewersCursor,
1541+
'allowModsToUnmuteUsers' => !is_null($this->allowModsToUnmuteUsers)?($this->allowModsToUnmuteUsers ? 'true' : 'false'):$this->allowModsToUnmuteUsers,
1542+
'allowModsToEjectCameras' => !is_null($this->allowModsToEjectCameras)?($this->allowModsToEjectCameras ? 'true' : 'false'):$this->allowModsToEjectCameras,
15411543
'bannerText' => trim($this->bannerText),
15421544
'bannerColor' => trim($this->bannerColor),
1543-
'learningDashboardEnabled' => $this->learningDashboardEnabled ? 'true' : 'false',
1544-
'virtualBackgroundsDisabled' => $this->virtualBackgroundsDisabled ? 'true' : 'false',
1545+
'learningDashboardEnabled' => !is_null($this->learningDashboardEnabled)?($this->learningDashboardEnabled ? 'true' : 'false'):$this->learningDashboardEnabled,
1546+
'virtualBackgroundsDisabled' => !is_null($this->virtualBackgroundsDisabled)?($this->virtualBackgroundsDisabled ? 'true' : 'false'):$this->virtualBackgroundsDisabled,
15451547
'endWhenNoModeratorDelayInMinutes' => $this->endWhenNoModeratorDelayInMinutes,
1546-
'allowRequestsWithoutSession' => $this->allowRequestsWithoutSession ? 'true' : 'false',
1548+
'allowRequestsWithoutSession' => !is_null($this->allowRequestsWithoutSession)?($this->allowRequestsWithoutSession ? 'true' : 'false'):$this->allowRequestsWithoutSession,
15471549
'meetingEndedURL' => $this->meetingEndedURL,
1548-
'breakoutRoomsEnabled' => $this->breakoutRoomsEnabled ? 'true' : 'false',
1549-
'breakoutRoomsRecord' => $this->breakoutRoomsRecord ? 'true' : 'false',
1550-
'breakoutRoomsPrivateChatEnabled' => $this->breakoutRoomsPrivateChatEnabled ? 'true' : 'false',
1551-
'endWhenNoModerator' => $this->endWhenNoModerator ? 'true' : 'false',
1552-
'meetingKeepEvents' => $this->meetingKeepEvents ? 'true' : 'false',
1550+
'breakoutRoomsEnabled' => !is_null($this->breakoutRoomsEnabled)?($this->breakoutRoomsEnabled ? 'true' : 'false'):$this->breakoutRoomsEnabled,
1551+
'breakoutRoomsRecord' => !is_null($this->breakoutRoomsRecord)?($this->breakoutRoomsRecord ? 'true' : 'false'):$this->breakoutRoomsRecord,
1552+
'breakoutRoomsPrivateChatEnabled' => !is_null($this->breakoutRoomsPrivateChatEnabled)?($this->breakoutRoomsPrivateChatEnabled ? 'true' : 'false'):$this->breakoutRoomsPrivateChatEnabled,
1553+
'endWhenNoModerator' => !is_null($this->endWhenNoModerator)?($this->endWhenNoModerator ? 'true' : 'false'):$this->endWhenNoModerator,
1554+
'meetingKeepEvents' => !is_null($this->meetingKeepEvents )?($this->meetingKeepEvents ? 'true' : 'false'):$this->meetingKeepEvents ,
15531555
'meetingLayout' => $this->meetingLayout,
15541556
'meetingCameraCap' => $this->meetingCameraCap,
15551557
'userCameraCap' => $this->userCameraCap,
15561558
'meetingExpireIfNoUserJoinedInMinutes' => $this->meetingExpireIfNoUserJoinedInMinutes,
15571559
'meetingExpireWhenLastUserLeftInMinutes' => $this->meetingExpireWhenLastUserLeftInMinutes,
15581560
'preUploadedPresentationOverrideDefault' => $this->preUploadedPresentationOverrideDefault,
15591561
'disabledFeatures' => join(',', $this->disabledFeatures),
1560-
'notifyRecordingIsOn' => $this->notifyRecordingIsOn ? 'true' : 'false',
1562+
'notifyRecordingIsOn' => is_null($this->notifyRecordingIsOn)?($this->notifyRecordingIsOn ? 'true' : 'false'):$this->notifyRecordingIsOn,
15611563
'presentationUploadExternalUrl' => $this->presentationUploadExternalUrl,
15621564
'presentationUploadExternalDescription' => $this->presentationUploadExternalDescription,
15631565
];
15641566

15651567
// Add breakout rooms parameters only if the meeting is a breakout room
15661568
if ($this->isBreakout()) {
15671569
$queries = array_merge($queries, [
1568-
'isBreakout' => $this->isBreakout ? 'true' : 'false',
1570+
'isBreakout' => !is_null($this->isBreakout)?($this->isBreakout ? 'true' : 'false'):$this->isBreakout,
15691571
'parentMeetingID' => $this->parentMeetingId,
15701572
'sequence' => $this->sequence,
1571-
'freeJoin' => $this->freeJoin ? 'true' : 'false',
1573+
'freeJoin' => !is_null($this->freeJoin)?($this->freeJoin ? 'true' : 'false'):$this->freeJoin,
15721574
]);
15731575
} else {
15741576
$queries = array_merge($queries, [

src/Parameters/DeleteRecordingsParameters.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ class DeleteRecordingsParameters extends BaseParameters
2828
/**
2929
* @var string
3030
*/
31-
private $recordingId;
31+
private ?string $recordingId =null;
3232

3333
/**
3434
* DeleteRecordingsParameters constructor.
3535
*
3636
* @param mixed $recordingId
3737
*/
38-
public function __construct($recordingId)
38+
public function __construct($recordingId=null)
3939
{
4040
$this->recordingId = $recordingId;
4141
}

src/Parameters/EndMeetingParameters.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@ class EndMeetingParameters extends BaseParameters
2828
/**
2929
* @var string
3030
*/
31-
private $meetingId;
31+
private ?string $meetingId =null;
3232

3333
/**
3434
* @deprecated
3535
*
3636
* @var string
3737
*/
38-
private $password;
3938

39+
private ?string $password = null;
4040
/**
4141
* EndMeetingParameters constructor.
4242
*
4343
* @param string $meetingId
4444
* @param string $password
4545
*/
46-
public function __construct($meetingId, $password = '')
46+
public function __construct($meetingId=null, $password = null)
4747
{
4848
$this->password = $password;
4949
$this->meetingId = $meetingId;

src/Parameters/GetMeetingInfoParameters.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,25 @@ class GetMeetingInfoParameters extends BaseParameters
2828
/**
2929
* @var string
3030
*/
31-
private $meetingId;
31+
private ?string $meetingId =null;
3232

3333
/**
3434
* @var int
3535
*/
36-
private $offset;
36+
37+
private ?int $offset = null ;
3738

3839
/**
3940
* @var int
4041
*/
41-
private $limit;
42+
private ?int $limit =null;
4243

4344
/**
4445
* GetMeetingInfoParameters constructor.
4546
*
4647
* @param mixed $meetingId
4748
*/
48-
public function __construct($meetingId)
49+
public function __construct($meetingId=null)
4950
{
5051
$this->meetingId = $meetingId;
5152
}

src/Parameters/GetRecordingTextTracksParameters.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ class GetRecordingTextTracksParameters extends MetaParameters
2828
/**
2929
* @var string
3030
*/
31-
private $recordId;
31+
private ?string $recordId =null;
3232

3333
/**
3434
* GetRecordingTextTracksParameters constructor.
3535
*
3636
* @param mixed $recordId
3737
*/
38-
public function __construct($recordId)
38+
public function __construct($recordId=null)
3939
{
4040
$this->recordId = $recordId;
4141
}

src/Parameters/GetRecordingsParameters.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ class GetRecordingsParameters extends MetaParameters
2828
/**
2929
* @var string
3030
*/
31-
private $meetingId;
31+
private ?string $meetingId =null;
3232

3333
/**
3434
* @var string
3535
*/
36-
private $recordId;
36+
private ?string $recordId =null;
3737

3838
/**
3939
* @var string
4040
*/
41-
private $state;
41+
private ?string $state =null;
4242

4343
/**
4444
* @return string

src/Parameters/HooksCreateParameters.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ class HooksCreateParameters extends BaseParameters
2525
/**
2626
* @var string
2727
*/
28-
private $callbackUrl;
28+
private ?string $callbackUrl =null;
2929

3030
/**
3131
* @var string
3232
*/
33-
private $meetingId;
33+
private ?string $meetingId =null;
3434

3535
/**
3636
* @var bool
3737
*/
38-
private $getRaw;
38+
private ?bool $getRaw =null;
3939

4040
/**
4141
* HooksCreateParameters constructor.
@@ -115,7 +115,7 @@ public function getHTTPQuery()
115115
$queries = [
116116
'callbackURL' => $this->callbackUrl,
117117
'meetingID' => $this->meetingId,
118-
'getRaw' => $this->getRaw ? 'true' : 'false',
118+
'getRaw' => !is_null($this->getRaw)?($this->getRaw ? 'true' : 'false'):$this->getRaw,
119119
];
120120

121121
return $this->buildHTTPQuery($queries);

src/Parameters/HooksDestroyParameters.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ class HooksDestroyParameters extends BaseParameters
2525
/**
2626
* @var string
2727
*/
28-
private $hookId;
28+
private ?string $hookId=null;
2929

3030
/**
3131
* HooksDestroyParameters constructor.
3232
*
3333
* @param mixed $hookId
3434
*/
35-
public function __construct($hookId)
35+
public function __construct($hookId=null)
3636
{
3737
$this->hookId = $hookId;
3838
}

src/Parameters/InsertDocumentParameters.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ class InsertDocumentParameters extends BaseParameters
3030
/**
3131
* @var string
3232
*/
33-
private $meetingId;
33+
private ?string $meetingId=null;
3434

3535
/**
3636
* EndMeetingParameters constructor.
3737
*
3838
* @param string $meetingId
3939
*/
40-
public function __construct($meetingId)
40+
public function __construct($meetingId=null)
4141
{
4242
$this->meetingId = $meetingId;
4343
}

src/Parameters/IsMeetingRunningParameters.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ class IsMeetingRunningParameters extends BaseParameters
2828
/**
2929
* @var string
3030
*/
31-
private $meetingId;
31+
private ?string $meetingId =null;
3232

3333
/**
3434
* IsMeetingRunningParameters constructor.
3535
*
3636
* @param mixed $meetingId
3737
*/
38-
public function __construct($meetingId)
38+
public function __construct($meetingId=null)
3939
{
4040
$this->meetingId = $meetingId;
4141
}

0 commit comments

Comments
 (0)