Completed
Push — master ( 9d9aa3...aeab87 )
by Ghazi
04:57
created

GetRecordingsResponse   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 1
cbo 2
dl 0
loc 24
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRecords() 0 13 3
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\Record;
22
23
/**
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