Passed
Pull Request — master (#248)
by
unknown
10:47
created

DocumentOptions   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
dl 0
loc 18
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A addOption() 0 5 1
A getOptions() 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\Config;
22
23
use BigBlueButton\Enum\DocumentOption;
24
25
class DocumentOptions
26
{
27
    /** @var array<string, bool> */
28
    private array $documentOptions = [];
29
30
    public function addOption(DocumentOption $documentOption, bool $value): self
31
    {
32
        $this->documentOptions[$documentOption->value] = $value;
33
34
        return $this;
35
    }
36
37
    /**
38
     * @return array<string, bool>
39
     */
40
    public function getOptions(): array
41
    {
42
        return $this->documentOptions;
43
    }
44
}
45