Skip to content

Commit 3fbf1a5

Browse files
committed
Improve array fill in response classes.
1 parent 592f5e9 commit 3fbf1a5

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

src/Responses/GetMeetingInfoResponse.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ class GetMeetingInfoResponse extends BaseResponse
4747
*/
4848
public function getMeetingInfo()
4949
{
50-
if ($this->meetingInfo !== null) {
51-
return $this->meetingInfo;
52-
} else {
50+
if ($this->meetingInfo === null) {
5351
$this->meetingInfo = new MeetingInfo($this->rawXml);
5452
}
5553

@@ -61,9 +59,7 @@ public function getMeetingInfo()
6159
*/
6260
public function getAttendees()
6361
{
64-
if ($this->attendees !== null) {
65-
return $this->attendees;
66-
} else {
62+
if ($this->attendees === null) {
6763
$this->attendees = [];
6864
foreach ($this->rawXml->attendees->attendee as $attendeeXml) {
6965
$this->attendees[] = new Attendee($attendeeXml);
@@ -78,9 +74,7 @@ public function getAttendees()
7874
*/
7975
public function getMetadata()
8076
{
81-
if ($this->metas !== null) {
82-
return $this->metas;
83-
} else {
77+
if ($this->metas === null) {
8478
$this->metas = [];
8579
foreach ($this->rawXml->metadata->children() as $metadataXml) {
8680
$this->metas[$metadataXml->getName()] = $metadataXml->__toString();

src/Responses/GetMeetingsResponse.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ class GetMeetingsResponse extends BaseResponse
3636
*/
3737
public function getMeetings()
3838
{
39-
if ($this->meetings !== null) {
40-
return $this->meetings;
41-
} else {
39+
if ($this->meetings === null) {
4240
$this->meetings = [];
4341
foreach ($this->rawXml->meetings->children() as $meetingXml) {
4442
$this->meetings[] = new Meeting($meetingXml);

src/Responses/GetRecordingsResponse.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ class GetRecordingsResponse extends BaseResponse
3636
*/
3737
public function getRecords()
3838
{
39-
if ($this->records !== null) {
40-
return $this->records;
41-
} else {
39+
if ($this->records === null) {
4240
$this->records = [];
4341
foreach ($this->rawXml->recordings->children() as $recordXml) {
4442
$this->records[] = new Record($recordXml);

0 commit comments

Comments
 (0)