Record::setModuleName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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