Passed
Push — master ( 2de9e3...c87c14 )
by Janko
09:57
created

AbstractSubspaceData::getDirection4Count()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 1
b 0
f 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Lib\Map\VisualPanel\Layer\Data;
6
7
use Doctrine\ORM\Mapping\Column;
8
use Stu\Lib\Map\FieldTypeEffectEnum;
9
10
abstract class AbstractSubspaceData extends AbstractData
11
{
12
    #[Column(type: 'integer')]
13
    protected int $d1c = 0;
14
    #[Column(type: 'integer')]
15
    protected int $d2c = 0;
16
    #[Column(type: 'integer')]
17
    protected int $d3c = 0;
18
    #[Column(type: 'integer')]
19
    protected int $d4c = 0;
20
21
    public function getDirection1Count(): int
22
    {
23
        return $this->d1c;
24
    }
25
26
    public function getDirection2Count(): int
27
    {
28
        return $this->d2c;
29
    }
30
31
    public function getDirection3Count(): int
32
    {
33
        return $this->d3c;
34
    }
35
36
    public function getDirection4Count(): int
37
    {
38
        return $this->d4c;
39
    }
40
41
    public function isDisabled(): bool
42
    {
43
        return $this->effects !== null
44
            && in_array(FieldTypeEffectEnum::NO_SUBSPACE_LINES->value, $this->effects);
45
    }
46
}
47