Settings   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 10
c 1
b 1
f 0
dl 0
loc 35
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A jsonSerialize() 0 3 1
A setDebug() 0 2 1
A getDebug() 0 2 1
A getColor() 0 2 1
A setColor() 0 2 1
1
<?php
2
/**
3
 * @copyright Copyright (c) 2019 Matthias Held <[email protected]>
4
 * @author Matthias Held <[email protected]>
5
 * @license GNU AGPL version 3 or any later version
6
 *
7
 * This program is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU Affero General Public License as
9
 * published by the Free Software Foundation, either version 3 of the
10
 * License, or (at your option) any later version.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU Affero General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Affero General Public License
18
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
 */
20
21
namespace OCA\RansomwareDetection\Model;
22
23
class Settings implements \JsonSerializable {
24
    /**
25
     * The debug state of the app.
26
     */
27
    private $debug;
28
29
    /**
30
     * The color state of the app.
31
     */
32
    private $color;
33
34
    public function __construct($debug, $color) {
35
        $this->debug = $debug;
36
        $this->color = $color;
37
    }
38
39
    public function getDebug() {
40
        return $this->debug;
41
    }
42
43
    public function setDebug($debug) {
44
        $this->debug = $debug;
45
    }
46
47
    public function getColor() {
48
        return $this->color;
49
    }
50
51
    public function setColor() {
52
        $this->color = $color;
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $color seems to be never defined.
Loading history...
53
    }
54
55
    public function jsonSerialize()
56
    {
57
        return get_object_vars($this);
58
    }
59
}