Code Duplication    Length = 24-24 lines in 2 locations

src/Responses/GetMeetingsResponse.php 1 location

@@ 27-50 (lines=24) @@
24
 * Class GetMeetingsResponse
25
 * @package BigBlueButton\Responses
26
 */
27
class GetMeetingsResponse extends BaseResponse
28
{
29
    /**
30
     * @var Meeting[]
31
     */
32
    private $meetings;
33
34
    /**
35
     * @return Meeting[]
36
     */
37
    public function getMeetings()
38
    {
39
        if (!is_null($this->meetings)) {
40
            return $this->meetings;
41
        } else {
42
            $this->meetings = [];
43
            foreach ($this->rawXml->meetings->children() as $meetingXml) {
44
                $this->meetings[] = new Meeting($meetingXml);
45
            }
46
        }
47
48
        return $this->meetings;
49
    }
50
}
51

src/Responses/GetRecordingsResponse.php 1 location

@@ 27-50 (lines=24) @@
24
 * Class GetRecordingsResponse
25
 * @package BigBlueButton\Responses
26
 */
27
class GetRecordingsResponse extends BaseResponse
28
{
29
    /**
30
     * @var Record[]
31
     */
32
    private $records;
33
34
    /**
35
     * @return Record[]
36
     */
37
    public function getRecords()
38
    {
39
        if (!is_null($this->records)) {
40
            return $this->records;
41
        } else {
42
            $this->records = [];
43
            foreach ($this->rawXml->recordings->children() as $recordXml) {
44
                $this->records[] = new Record($recordXml);
45
            }
46
        }
47
48
        return $this->records;
49
    }
50
}
51