Completed
Push — master ( 3cdfe3...278a1b )
by Ghazi
02:28
created

GetMeetingsResponse::getMessageKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
4
 *
5
 * Copyright (c) 2016 BigBlueButton Inc. and by respective authors (see below).
6
 *
7
 * This program is free software; you can redistribute it and/or modify it under the
8
 * terms of the GNU Lesser General Public License as published by the Free Software
9
 * Foundation; either version 3.0 of the License, or (at your option) any later
10
 * version.
11
 *
12
 * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
13
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14
 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU Lesser General Public License along
17
 * with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
18
 */
19
namespace BigBlueButton\Responses;
20
21
use BigBlueButton\Core\Meeting;
22
23
/**
24
 * Class GetMeetingsResponse
25
 * @package BigBlueButton\Responses
26
 */
27 View Code Duplication
class GetMeetingsResponse extends BaseResponse
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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