HooksCreateParameters   A
last analyzed

Complexity

Total Complexity 12

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 12
eloc 23
c 3
b 1
f 0
dl 0
loc 72
rs 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getHTTPQuery() 0 9 3
A __construct() 0 3 1
A setMeetingId() 0 5 1
A getCallbackUrl() 0 3 1
A setCallbackUrl() 0 5 1
A getMeetingId() 0 3 1
A getEventId() 0 3 1
A setEventId() 0 5 1
A setGetRaw() 0 5 1
A getRaw() 0 3 1
1
<?php
2
3
/*
4
 * BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
5
 *
6
 * Copyright (c) 2016-2024 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 <https://www.gnu.org/licenses/>.
19
 */
20
21
namespace BigBlueButton\Parameters;
22
23
class HooksCreateParameters extends BaseParameters
24
{
25
    private string $callbackUrl;
26
27
    private ?string $meetingId = null;
28
29
    private ?string $eventId = null;
30
31
    private ?bool $getRaw = null;
32
33
    public function __construct(string $callbackUrl)
34
    {
35
        $this->callbackUrl = $callbackUrl;
36
    }
37
38
    public function getCallbackUrl(): string
39
    {
40
        return $this->callbackUrl;
41
    }
42
43
    public function setCallbackUrl(string $callbackUrl): self
44
    {
45
        $this->callbackUrl = $callbackUrl;
46
47
        return $this;
48
    }
49
50
    public function getMeetingId(): ?string
51
    {
52
        return $this->meetingId;
53
    }
54
55
    public function setMeetingId(string $meetingId): self
56
    {
57
        $this->meetingId = $meetingId;
58
59
        return $this;
60
    }
61
62
    public function getEventId(): ?string
63
    {
64
        return $this->eventId;
65
    }
66
67
    public function setEventId(string $eventId): self
68
    {
69
        $this->eventId = $eventId;
70
71
        return $this;
72
    }
73
74
    public function getRaw(): ?bool
75
    {
76
        return $this->getRaw;
77
    }
78
79
    public function setGetRaw(bool $getRaw): self
80
    {
81
        $this->getRaw = $getRaw;
82
83
        return $this;
84
    }
85
86
    public function getHTTPQuery(): string
87
    {
88
        $queries = [
89
            'callbackURL' => $this->callbackUrl,
90
            'meetingID'   => $this->meetingId,
91
            'getRaw'      => !is_null($this->getRaw) ? ($this->getRaw ? 'true' : 'false') : $this->getRaw,
92
        ];
93
94
        return $this->buildHTTPQuery($queries);
95
    }
96
}
97