Skip to content

Commit 575d94e

Browse files
committed
Transform to php74 style
1 parent 5b97c82 commit 575d94e

12 files changed

+24
-87
lines changed

src/Parameters/BaseParameters.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ abstract class BaseParameters
2828
/**
2929
* @return string
3030
*/
31-
abstract public function getHTTPQuery();
31+
abstract public function getHTTPQuery(): string;
3232

3333
/**
3434
* @param mixed $array
35-
*
36-
* @return string
3735
*/
38-
protected function buildHTTPQuery($array)
36+
protected function buildHTTPQuery($array): string
3937
{
4038
return str_replace(['%20', '!', "'", '(', ')', '*'], ['+', '%21', '%27', '%28', '%29', '%2A'], http_build_query(array_filter($array), '', '&', \PHP_QUERY_RFC3986));
4139
}

src/Parameters/MetaParameters.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@ public function getMeta(string $key)
4040

4141
/**
4242
* @param mixed $value
43-
*
44-
* @return $this
4543
*/
46-
public function addMeta(string $key, $value)
44+
public function addMeta(string $key, $value): MetaParameters
4745
{
4846
$this->meta[$key] = $value;
4947

src/Parameters/UserDataParameters.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@ public function getUserData(string $key)
3737

3838
/**
3939
* @param mixed $value
40-
*
41-
* @return $this
4240
*/
43-
public function addUserData(string $key, $value): self
41+
public function addUserData(string $key, $value): UserDataParameters
4442
{
4543
$this->userData[$key] = $value;
4644

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/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 & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,9 @@
2727
*/
2828
class GetMeetingInfoResponse extends BaseResponse
2929
{
30-
/**
31-
* @var Meeting
32-
*/
33-
private $meeting;
30+
private Meeting $meeting;
3431

35-
/**
36-
* @return Meeting
37-
*/
38-
public function getMeeting()
32+
public function getMeeting(): Meeting
3933
{
4034
if (null === $this->meeting) {
4135
$this->meeting = new Meeting($this->rawXml);

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
}

src/Responses/JoinMeetingResponse.php

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,50 +25,32 @@
2525
*/
2626
class JoinMeetingResponse extends BaseResponse
2727
{
28-
/**
29-
* @return string
30-
*/
31-
public function getMeetingId()
28+
public function getMeetingId(): string
3229
{
3330
return $this->rawXml->meeting_id->__toString();
3431
}
3532

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

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

52-
/**
53-
* @return string
54-
*/
55-
public function getSessionToken()
43+
public function getSessionToken(): string
5644
{
5745
return $this->rawXml->session_token->__toString();
5846
}
5947

60-
/**
61-
* @return string
62-
*/
63-
public function getGuestStatus()
48+
public function getGuestStatus(): string
6449
{
6550
return $this->rawXml->guestStatus->__toString();
6651
}
6752

68-
/**
69-
* @return string
70-
*/
71-
public function getUrl()
53+
public function getUrl(): string
7254
{
7355
return $this->rawXml->url->__toString();
7456
}

0 commit comments

Comments
 (0)