Record   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 41
ccs 15
cts 15
cp 1
rs 10
c 1
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A isEnabled() 0 3 1
A getParams() 0 3 1
A setParams() 0 3 1
A getModuleName() 0 3 1
A setEnabled() 0 3 1
A setModuleName() 0 3 1
1
<?php
2
3
namespace kalanis\kw_modules\ModulesLists;
4
5
6
/**
7
 * Class Record
8
 * @package kalanis\kw_modules\Lists
9
 * Single record about module from configuration
10
 */
11
class Record
12
{
13
    protected string $moduleName = '';
14
    /** @var array<string|int, string|int|float|bool|array<string|int>> */
15
    protected array $params = [];
16
    protected bool $enabled = false;
17
18 7
    public function setModuleName(string $moduleName): void
19
    {
20 7
        $this->moduleName = $moduleName;
21 7
    }
22
23
    /**
24
     * @param array<string|int, string|int|float|bool|array<string|int>> $params
25
     */
26 4
    public function setParams(array $params = []): void
27
    {
28 4
        $this->params = $params;
29 4
    }
30
31 7
    public function setEnabled(bool $enabled): void
32
    {
33 7
        $this->enabled = $enabled;
34 7
    }
35
36 4
    public function getModuleName(): string
37
    {
38 4
        return $this->moduleName;
39
    }
40
41
    /**
42
     * @return array<string|int, string|int|float|bool|array<string|int>>
43
     */
44 5
    public function getParams(): array
45
    {
46 5
        return $this->params;
47
    }
48
49 5
    public function isEnabled(): bool
50
    {
51 5
        return $this->enabled;
52
    }
53
}
54