Passed
Push — main ( f82312...487838 )
by Miaad
10:48 queued 13s
created

easyJson   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 70
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 16
c 1
b 0
f 0
dl 0
loc 70
rs 10
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A setChannel() 0 3 1
A setSuperGroup() 0 3 1
A getSettings() 0 2 1
A setGlobal() 0 3 1
A setUser() 0 3 1
A setGroupUser() 0 3 1
A setGroup() 0 3 1
1
<?php
2
3
namespace BPT\settings;
4
5
use BPT\constants\dbTypes;
6
7
class easyJson {
8
    private array $settings = [
9
        'type' => dbTypes::JSON,
10
    ];
11
12
    /**
13
     * @param array $global
14
     *
15
     * @return $this
16
     */
17
    public function setGlobal (array $global): self {
18
        $this->settings['global'] = $global;
19
        return $this;
20
    }
21
22
    /**
23
     * @param array $group
24
     *
25
     * @return $this
26
     */
27
    public function setGroup (array $group): self {
28
        $this->settings['group'] = $group;
29
        return $this;
30
    }
31
32
    /**
33
     * @param array $supergroup
34
     *
35
     * @return $this
36
     */
37
    public function setSuperGroup (array $supergroup): self {
38
        $this->settings['supergroup'] = $supergroup;
39
        return $this;
40
    }
41
42
    /**
43
     * @param array $channel
44
     *
45
     * @return $this
46
     */
47
    public function setChannel (array $channel): self {
48
        $this->settings['channel'] = $channel;
49
        return $this;
50
    }
51
52
    /**
53
     * @param array $user
54
     *
55
     * @return $this
56
     */
57
    public function setUser (array $user): self {
58
        $this->settings['user'] = $user;
59
        return $this;
60
    }
61
62
    /**
63
     * @param array $group_user
64
     *
65
     * @return $this
66
     */
67
    public function setGroupUser (array $group_user): self {
68
        $this->settings['group_user'] = $group_user;
69
        return $this;
70
    }
71
72
    /**
73
     * @return array
74
     */
75
    public function getSettings (): array {
76
        return $this->settings;
77
    }
78
}