Skip to content
Merged
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
12 changes: 3 additions & 9 deletions src/BigBlueButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,9 @@ public function getRecordingsUrl(GetRecordingsParameters $recordingsParams): str
}

/**
* @param mixed $recordingParams
*
* @throws BadResponseException|\RuntimeException
*/
public function getRecordings($recordingParams): GetRecordingsResponse
public function getRecordings(GetRecordingsParameters $recordingParams): GetRecordingsResponse
{
$xml = $this->processXmlResponse($this->getUrlBuilder()->getRecordingsUrl($recordingParams));

Expand Down Expand Up @@ -414,11 +412,9 @@ public function getHooksCreateUrl(HooksCreateParameters $hookCreateParams): stri
}

/**
* @param mixed $hookCreateParams
*
* @throws BadResponseException
*/
public function hooksCreate($hookCreateParams): HooksCreateResponse
public function hooksCreate(HooksCreateParameters $hookCreateParams): HooksCreateResponse
{
$xml = $this->processXmlResponse($this->getUrlBuilder()->getHooksCreateUrl($hookCreateParams));

Expand Down Expand Up @@ -452,11 +448,9 @@ public function getHooksDestroyUrl(HooksDestroyParameters $hooksDestroyParams):
}

/**
* @param mixed $hooksDestroyParams
*
* @throws BadResponseException
*/
public function hooksDestroy($hooksDestroyParams): HooksDestroyResponse
public function hooksDestroy(HooksDestroyParameters $hooksDestroyParams): HooksDestroyResponse
{
$xml = $this->processXmlResponse($this->getUrlBuilder()->getHooksDestroyUrl($hooksDestroyParams));

Expand Down
5 changes: 1 addition & 4 deletions src/Core/Track.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ class Track

private string $source;

/**
* @param mixed $track
*/
public function __construct($track)
public function __construct(mixed $track)
{
$this->href = $track->href;
$this->kind = $track->kind;
Expand Down
33 changes: 9 additions & 24 deletions src/Parameters/CreateMeetingParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class CreateMeetingParameters extends MetaParameters
{
use DocumentableTrait;

private ?string $meetingId = null;
private string $meetingId;

private ?string $meetingName = null;
private string $meetingName;

/**
* @deprecated Password-string replaced by an Enum\Role-constant in JoinMeetingParameters::__construct()
Expand Down Expand Up @@ -183,11 +183,8 @@ class CreateMeetingParameters extends MetaParameters

/**
* CreateMeetingParameters constructor.
*
* @param mixed $meetingId
* @param mixed $meetingName
*/
public function __construct($meetingId = null, $meetingName = null)
public function __construct(string $meetingId, string $meetingName)
{
$this->meetingId = $meetingId;
$this->meetingName = $meetingName;
Expand Down Expand Up @@ -609,12 +606,9 @@ public function isVirtualBackgroundsDisabled(): ?bool
* Default: false
*
* @since 2.4.3
*
* @param mixed $virtualBackgroundsDisabled
*
* @deprecated Removed in 2.5, temporarily still handled, please transition to disabledFeatures.
*/
public function setVirtualBackgroundsDisabled($virtualBackgroundsDisabled): self
public function setVirtualBackgroundsDisabled(bool $virtualBackgroundsDisabled): self
{
$this->virtualBackgroundsDisabled = $virtualBackgroundsDisabled;

Expand Down Expand Up @@ -998,10 +992,7 @@ public function setEndCallbackUrl($endCallbackUrl): self
return $this;
}

/**
* @param mixed $recordingReadyCallbackUrl
*/
public function setRecordingReadyCallbackUrl($recordingReadyCallbackUrl): self
public function setRecordingReadyCallbackUrl(string $recordingReadyCallbackUrl): self
{
$this->addMeta('bbb-recording-ready-url', $recordingReadyCallbackUrl);

Expand Down Expand Up @@ -1102,11 +1093,9 @@ public function isBreakoutRoomsEnabled(): ?bool
*
* Default: true
*
* @param mixed $breakoutRoomsEnabled
*
* @deprecated Removed in 2.5, temporarily still handled, please transition to disabledFeatures.
*/
public function setBreakoutRoomsEnabled($breakoutRoomsEnabled): self
public function setBreakoutRoomsEnabled(bool $breakoutRoomsEnabled): self
{
$this->breakoutRoomsEnabled = $breakoutRoomsEnabled;

Expand Down Expand Up @@ -1195,10 +1184,8 @@ public function isAllowRequestsWithoutSession(): ?bool
* Default: false
*
* @since 2.4.3
*
* @param mixed $allowRequestsWithoutSession
*/
public function setAllowRequestsWithoutSession($allowRequestsWithoutSession): self
public function setAllowRequestsWithoutSession(bool $allowRequestsWithoutSession): self
{
$this->allowRequestsWithoutSession = $allowRequestsWithoutSession;

Expand Down Expand Up @@ -1447,11 +1434,9 @@ public function getBreakoutRoomsGroups(): array
}

/**
* @param mixed $id
* @param mixed $name
* @param mixed $roster
* @param array<int, string> $roster
*/
public function addBreakoutRoomsGroup($id, $name, $roster): self
public function addBreakoutRoomsGroup(mixed $id, string $name, array $roster): self
{
$this->breakoutRoomsGroups[] = ['id' => $id, 'name' => $name, 'roster' => $roster];

Expand Down
6 changes: 3 additions & 3 deletions src/Parameters/DeleteRecordingsParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
*/
class DeleteRecordingsParameters extends BaseParameters
{
private ?string $recordingId = null;
private string $recordingId;

public function __construct(?string $recordingId = null)
public function __construct(string $recordingId)
{
$this->recordingId = $recordingId;
}
Expand All @@ -40,7 +40,7 @@ public function getRecordingId(): ?string
return $this->recordingId;
}

public function setRecordingId(string $recordingId): DeleteRecordingsParameters
public function setRecordingId(string $recordingId): self
{
$this->recordingId = $recordingId;

Expand Down
10 changes: 6 additions & 4 deletions src/Parameters/EndMeetingParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@
*/
class EndMeetingParameters extends BaseParameters
{
private ?string $meetingId = null;
private string $meetingId;

/**
* The password of the moderator.
*
* @deprecated
*/
private ?string $password = null;
private ?string $password;

public function __construct(?string $meetingId = null, ?string $password = null)
public function __construct(string $meetingId, ?string $password = null)
{
$this->password = $password;
$this->meetingId = $meetingId;
Expand Down Expand Up @@ -65,7 +67,7 @@ public function getPassword(): ?string
/**
* @deprecated
*/
public function setPassword(string $password): self
public function setPassword(?string $password): self
{
$this->password = $password;

Expand Down
8 changes: 4 additions & 4 deletions src/Parameters/GetMeetingInfoParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
*/
class GetMeetingInfoParameters extends BaseParameters
{
private ?string $meetingId = null;
private string $meetingId;

private ?int $offset = null;

private ?int $limit = null;

public function __construct(?string $meetingId = null)
public function __construct(string $meetingId)
{
$this->meetingId = $meetingId;
}
Expand All @@ -57,7 +57,7 @@ public function getOffset(): ?int
return $this->offset;
}

public function setOffset(int $offset): self
public function setOffset(?int $offset): self
{
$this->offset = $offset;

Expand All @@ -70,7 +70,7 @@ public function getLimit(): ?int
return $this->limit;
}

public function setLimit(int $limit): self
public function setLimit(?int $limit): self
{
$this->limit = $limit;

Expand Down
4 changes: 2 additions & 2 deletions src/Parameters/GetRecordingTextTracksParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
*/
class GetRecordingTextTracksParameters extends MetaParameters
{
private ?string $recordId = null;
private string $recordId;

/**
* GetRecordingTextTracksParameters constructor.
*/
public function __construct(?string $recordId = null)
public function __construct(string $recordId)
{
$this->recordId = $recordId;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Parameters/InsertDocumentParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class InsertDocumentParameters extends BaseParameters
{
use DocumentableTrait;

private ?string $meetingId = null;
private string $meetingId;

public function __construct(?string $meetingId = null)
public function __construct(string $meetingId)
{
$this->meetingId = $meetingId;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Parameters/IsMeetingRunningParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
*/
class IsMeetingRunningParameters extends BaseParameters
{
private ?string $meetingId = null;
private string $meetingId;

public function __construct(?string $meetingId = null)
public function __construct(string $meetingId)
{
$this->meetingId = $meetingId;
}
Expand Down
20 changes: 7 additions & 13 deletions src/Parameters/JoinMeetingParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
*/
class JoinMeetingParameters extends UserDataParameters
{
private ?string $meetingId;
private string $meetingId;

private ?string $username;
private string $username;

/**
* @deprecated Password-string replaced by an Enum\Role-constant in JoinMeetingParameters::__construct()
Expand All @@ -50,7 +50,7 @@ class JoinMeetingParameters extends UserDataParameters
/**
* @var array<string, string>
*/
private array $customParameters;
private array $customParameters = [];

private ?string $role = null;

Expand All @@ -60,12 +60,7 @@ class JoinMeetingParameters extends UserDataParameters

private ?string $defaultLayout = null;

/**
* @param mixed $passwordOrRole
* @param mixed $meetingId
* @param mixed $username
*/
public function __construct($meetingId = null, $username = null, $passwordOrRole = null)
public function __construct(string $meetingId, string $username, string $passwordOrRole)
{
$this->meetingId = $meetingId;
$this->username = $username;
Expand All @@ -75,7 +70,6 @@ public function __construct($meetingId = null, $username = null, $passwordOrRole
} else {
$this->password = $passwordOrRole;
}
$this->customParameters = [];
}

#[ApiParameterMapper(attributeName: 'meetingID')]
Expand All @@ -84,7 +78,7 @@ public function getMeetingId(): ?string
return $this->meetingId;
}

public function setMeetingId(string $meetingId): JoinMeetingParameters
public function setMeetingId(string $meetingId): self
{
$this->meetingId = $meetingId;

Expand Down Expand Up @@ -116,7 +110,7 @@ public function getPassword(): ?string
/**
*@deprecated Password-string replaced by an Enum\Role-constant in JoinMeetingParameters::__construct()
*/
public function setPassword(string $password): self
public function setPassword(?string $password): self
{
$this->password = $password;

Expand Down Expand Up @@ -255,7 +249,7 @@ public function getHTTPQuery(): string
$queries[$key] = $value;
}

$queries = $this->buildUserData($queries);
$this->buildUserData($queries);

return $this->buildHTTPQuery($queries);
}
Expand Down
8 changes: 4 additions & 4 deletions src/Parameters/PublishRecordingsParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
*/
class PublishRecordingsParameters extends BaseParameters
{
private ?string $recordingId = null;
private string $recordingId;

private ?bool $publish = null;
private bool $publish;

public function __construct(string $recordingId, ?bool $publish = null)
public function __construct(string $recordingId, bool $publish)
{
$this->recordingId = $recordingId;
$this->publish = $publish;
Expand Down Expand Up @@ -71,7 +71,7 @@ public function toArray(): array
{
return [
'recordID' => $this->recordingId,
'publish' => !is_null($this->publish) ? ($this->publish ? 'true' : 'false') : $this->publish,
'publish' => $this->publish ? 'true' : 'false',
];
}
}
10 changes: 5 additions & 5 deletions src/Parameters/PutRecordingTextTrackParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@
*/
class PutRecordingTextTrackParameters extends BaseParameters
{
private ?string $recordId = null;
private string $recordId;

private ?string $kind = null;
private string $kind;

private ?string $lang = null;
private string $lang;

private ?string $label = null;
private string $label;

/**
* PutRecordingTextTrackParameters constructor.
*/
public function __construct(?string $recordId = null, ?string $kind = null, ?string $lang = null, ?string $label = null)
public function __construct(string $recordId, string $kind, string $lang, string $label)
{
$this->recordId = $recordId;
$this->kind = $kind;
Expand Down
4 changes: 2 additions & 2 deletions src/Parameters/UpdateRecordingsParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
*/
class UpdateRecordingsParameters extends MetaParameters
{
private ?string $recordingId = null;
private string $recordingId;

public function __construct(?string $recordingId = null)
public function __construct(string $recordingId)
{
$this->recordingId = $recordingId;
}
Expand Down
Loading