Skip to content

Commit b14a0cd

Browse files
committed
Merge branch 'master' into tests/coverage
2 parents e9fb2cc + 16eea90 commit b14a0cd

18 files changed

+621
-173
lines changed

src/BigBlueButton.php

Lines changed: 103 additions & 39 deletions
Large diffs are not rendered by default.

src/Parameters/BaseParameters.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,12 @@
2525
*/
2626
abstract class BaseParameters
2727
{
28-
/**
29-
* @return string
30-
*/
31-
abstract public function getHTTPQuery();
28+
abstract public function getHTTPQuery(): string;
3229

3330
/**
3431
* @param mixed $array
35-
*
36-
* @return string
3732
*/
38-
protected function buildHTTPQuery($array)
33+
protected function buildHTTPQuery($array): string
3934
{
4035
return str_replace(['%20', '!', "'", '(', ')', '*'], ['+', '%21', '%27', '%28', '%29', '%2A'], http_build_query(array_filter($array), '', '&', \PHP_QUERY_RFC3986));
4136
}

src/Parameters/JoinMeetingParameters.php

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ class JoinMeetingParameters extends UserDataParameters
4646

4747
private ?bool $redirect = null;
4848

49-
private ?string $clientURL = null;
50-
5149
/**
5250
* @var array<string, string>
5351
*/
@@ -57,8 +55,6 @@ class JoinMeetingParameters extends UserDataParameters
5755

5856
private ?bool $excludeFromDashboard = null;
5957

60-
private ?string $configToken = null;
61-
6258
private ?bool $guest = null;
6359

6460
private ?string $defaultLayout = null;
@@ -183,18 +179,6 @@ public function setRedirect(bool $redirect): self
183179
return $this;
184180
}
185181

186-
public function getClientURL(): ?string
187-
{
188-
return $this->clientURL;
189-
}
190-
191-
public function setClientURL(?string $clientURL): self
192-
{
193-
$this->clientURL = $clientURL;
194-
195-
return $this;
196-
}
197-
198182
public function getRole(): ?string
199183
{
200184
return $this->role;
@@ -219,18 +203,6 @@ public function setExcludeFromDashboard(bool $excludeFromDashboard): self
219203
return $this;
220204
}
221205

222-
public function getConfigToken(): ?string
223-
{
224-
return $this->configToken;
225-
}
226-
227-
public function setConfigToken(string $configToken): self
228-
{
229-
$this->configToken = $configToken;
230-
231-
return $this;
232-
}
233-
234206
public function isGuest(): ?bool
235207
{
236208
return $this->guest;
@@ -275,8 +247,6 @@ public function getHTTPQuery(): string
275247
'excludeFromDashboard' => !is_null($this->excludeFromDashboard) ? ($this->excludeFromDashboard ? 'true' : 'false') : $this->excludeFromDashboard,
276248
'avatarURL' => $this->avatarURL,
277249
'redirect' => !is_null($this->redirect) ? ($this->redirect ? 'true' : 'false') : $this->redirect,
278-
'clientURL' => $this->clientURL,
279-
'configToken' => $this->configToken,
280250
'guest' => !is_null($this->guest) ? ($this->guest ? 'true' : 'false') : $this->guest,
281251
'defaultLayout' => $this->defaultLayout,
282252
];

src/Responses/ApiVersionResponse.php

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,17 @@
2525
*/
2626
class ApiVersionResponse extends BaseResponse
2727
{
28-
/**
29-
* @return string
30-
*/
31-
public function getVersion()
28+
public function getVersion(): string
3229
{
3330
return $this->rawXml->version->__toString();
3431
}
3532

36-
/**
37-
* @return string
38-
*/
39-
public function getApiVersion()
33+
public function getApiVersion(): string
4034
{
4135
return $this->rawXml->apiVersion->__toString();
4236
}
4337

44-
/**
45-
* @return string
46-
*/
47-
public function getBbbVersion()
38+
public function getBbbVersion(): string
4839
{
4940
return $this->rawXml->bbbVersion->__toString();
5041
}

src/Responses/BaseJsonResponse.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ public function getRawJson()
4646
return json_encode($this->data);
4747
}
4848

49-
/**
50-
* @return null|mixed
51-
*/
52-
public function getMessage()
49+
public function getMessage(): ?string
5350
{
5451
if ($this->failed()) {
5552
return $this->data->response->message;
@@ -58,10 +55,7 @@ public function getMessage()
5855
return null;
5956
}
6057

61-
/**
62-
* @return null|mixed
63-
*/
64-
public function getMessageKey()
58+
public function getMessageKey(): ?string
6559
{
6660
if ($this->failed()) {
6761
return $this->data->response->messageKey;
@@ -71,9 +65,11 @@ public function getMessageKey()
7165
}
7266

7367
/**
74-
* @return mixed
68+
* Return will be either 'SUCCESS' or 'FAILED' (nothing else).
69+
*
70+
* @see: https://docs.bigbluebutton.org/development/api/#api-calls
7571
*/
76-
public function getReturnCode()
72+
public function getReturnCode(): string
7773
{
7874
return $this->data->response->returncode;
7975
}

src/Responses/DeleteRecordingsResponse.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,8 @@
2525
*/
2626
class DeleteRecordingsResponse extends BaseResponse
2727
{
28-
/**
29-
* @return null|bool
30-
*/
31-
public function isDeleted()
28+
public function isDeleted(): bool
3229
{
33-
return 'true' == $this->rawXml->deleted->__toString();
30+
return 'true' === $this->rawXml->deleted->__toString();
3431
}
3532
}

src/Responses/GetMeetingInfoResponse.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,8 @@
2727
*/
2828
class GetMeetingInfoResponse extends BaseResponse
2929
{
30-
/**
31-
* @var Meeting
32-
*/
33-
private $meeting;
34-
35-
/**
36-
* @return Meeting
37-
*/
38-
public function getMeeting()
30+
public function getMeeting(): Meeting
3931
{
40-
if (null === $this->meeting) {
41-
$this->meeting = new Meeting($this->rawXml);
42-
}
43-
44-
return $this->meeting;
32+
return new Meeting($this->rawXml);
4533
}
4634
}

src/Responses/HooksCreateResponse.php

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,17 @@
2525
*/
2626
class HooksCreateResponse extends BaseResponse
2727
{
28-
/**
29-
* @return int
30-
*/
31-
public function getHookId()
28+
public function getHookId(): int
3229
{
3330
return (int) $this->rawXml->hookID->__toString();
3431
}
3532

36-
/**
37-
* @return null|bool
38-
*/
39-
public function isPermanentHook()
33+
public function isPermanentHook(): bool
4034
{
4135
return 'true' === $this->rawXml->permanentHook->__toString();
4236
}
4337

44-
/**
45-
* @return null|bool
46-
*/
47-
public function hasRawData()
38+
public function hasRawData(): bool
4839
{
4940
return 'true' === $this->rawXml->rawData->__toString();
5041
}

src/Responses/HooksDestroyResponse.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@
2525
*/
2626
class HooksDestroyResponse extends BaseResponse
2727
{
28-
/**
29-
* @return null|bool
30-
*/
31-
public function removed()
28+
public function removed(): bool
3229
{
3330
return 'true' === $this->rawXml->removed->__toString();
3431
}

src/Responses/IsMeetingRunningResponse.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@
2525
*/
2626
class IsMeetingRunningResponse extends BaseResponse
2727
{
28-
/**
29-
* @return null|bool
30-
*/
31-
public function isRunning()
28+
public function isRunning(): bool
3229
{
3330
return 'true' === $this->rawXml->running->__toString();
3431
}

0 commit comments

Comments
 (0)