Passed
Pull Request — master (#189)
by Ghazi
10:24
created

CreateMeetingResponse   A

Complexity

Total Complexity 12

Size/Duplication

Total Lines 100
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 12
eloc 13
c 1
b 0
f 0
dl 0
loc 100
rs 10

12 Methods

Rating   Name   Duplication   Size   Complexity  
A getMeetingId() 0 3 1
A getDuration() 0 3 1
A getInternalMeetingId() 0 3 1
A getDialNumber() 0 3 1
A getParentMeetingId() 0 3 1
A getVoiceBridge() 0 3 1
A getModeratorPassword() 0 3 1
A hasBeenForciblyEnded() 0 3 1
A getAttendeePassword() 0 3 1
A hasUserJoined() 0 3 1
A getCreationTime() 0 3 1
A getCreationDate() 0 3 1
1
<?php
2
3
/*
4
 * BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
5
 *
6
 * Copyright (c) 2016-2022 BigBlueButton Inc. and by respective authors (see below).
7
 *
8
 * This program is free software; you can redistribute it and/or modify it under the
9
 * terms of the GNU Lesser General Public License as published by the Free Software
10
 * Foundation; either version 3.0 of the License, or (at your option) any later
11
 * version.
12
 *
13
 * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
14
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15
 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Lesser General Public License along
18
 * with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
19
 */
20
21
namespace BigBlueButton\Responses;
22
23
/**
24
 * Class CreateMeetingResponse.
25
 */
26
class CreateMeetingResponse extends BaseResponse
27
{
28
    /**
29
     * @return string
30
     */
31
    public function getMeetingId()
32
    {
33
        return $this->rawXml->meetingID->__toString();
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getInternalMeetingId()
40
    {
41
        return $this->rawXml->internalMeetingID->__toString();
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getParentMeetingId()
48
    {
49
        return $this->rawXml->parentMeetingID->__toString();
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getAttendeePassword()
56
    {
57
        return $this->rawXml->attendeePW->__toString();
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getModeratorPassword()
64
    {
65
        return $this->rawXml->moderatorPW->__toString();
66
    }
67
68
    /**
69
     * Creation timestamp.
70
     *
71
     * @return float
72
     */
73
    public function getCreationTime()
74
    {
75
        return (float) $this->rawXml->createTime;
76
    }
77
78
    /**
79
     * @return int
80
     */
81
    public function getVoiceBridge()
82
    {
83
        return (int) $this->rawXml->voiceBridge;
84
    }
85
86
    /**
87
     * @return string
88
     */
89
    public function getDialNumber()
90
    {
91
        return $this->rawXml->dialNumber->__toString();
92
    }
93
94
    /**
95
     * Creation date at the format "Sun Jan 17 18:20:07 EST 2016".
96
     *
97
     * @return string
98
     */
99
    public function getCreationDate()
100
    {
101
        return $this->rawXml->createDate->__toString();
102
    }
103
104
    /**
105
     * @return true
106
     */
107
    public function hasUserJoined()
108
    {
109
        return 'true' === $this->rawXml->hasUserJoined->__toString();
0 ignored issues
show
Bug Best Practice introduced by
The expression return 'true' === $this-...serJoined->__toString() returns the type boolean which is incompatible with the documented return type true.
Loading history...
110
    }
111
112
    /**
113
     * @return int
114
     */
115
    public function getDuration()
116
    {
117
        return (int) $this->rawXml->duration;
118
    }
119
120
    /**
121
     * @return null|bool
122
     */
123
    public function hasBeenForciblyEnded()
124
    {
125
        return 'true' === $this->rawXml->hasBeenForciblyEnded->__toString();
126
    }
127
}
128