Cut   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
eloc 11
c 0
b 0
f 0
dl 0
loc 37
ccs 11
cts 11
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getBitwiseBlock() 0 3 1
A getBitsInAffectedPart() 0 3 1
A setData() 0 6 1
A getAddress() 0 3 1
1
<?php
2
3
namespace kalanis\kw_bans\Bans;
4
5
6
class Cut
7
{
8
    /** @var array<int, string> */
9
    protected array $useAddress = [];
10
    protected string $bitwiseBlock = '';
11
    protected int $bitsInAffectedPart = 0;
12
13
    /**
14
     * @param array<int, string> $useAddress
15
     * @param string $bitwiseBlock
16
     * @param int $bitsInAffectedPart
17
     * @return $this
18
     */
19 16
    public function setData(array $useAddress, string $bitwiseBlock, int $bitsInAffectedPart): self
20
    {
21 16
        $this->useAddress = $useAddress;
22 16
        $this->bitwiseBlock = $bitwiseBlock;
23 16
        $this->bitsInAffectedPart = $bitsInAffectedPart;
24 16
        return $this;
25
    }
26
27
    /**
28
     * @return array<int, string>
29
     */
30 16
    public function getAddress(): array
31
    {
32 16
        return $this->useAddress;
33
    }
34
35 4
    public function getBitwiseBlock(): string
36
    {
37 4
        return $this->bitwiseBlock;
38
    }
39
40 9
    public function getBitsInAffectedPart(): int
41
    {
42 9
        return $this->bitsInAffectedPart;
43
    }
44
}
45