HasDoorAccess::setDoor1()   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 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Traits;
6
7
use Doctrine\ORM\Mapping as ORM;
8
9
/**
10
 * Access to all doors.
11
 */
12
trait HasDoorAccess
13
{
14
    #[ORM\Column(type: 'boolean', options: ['default' => true])]
15
    private bool $door1 = true;
16
17
    #[ORM\Column(type: 'boolean', options: ['default' => true])]
18
    private bool $door2 = true;
19
20
    #[ORM\Column(type: 'boolean', options: ['default' => true])]
21
    private bool $door3 = true;
22
23
    #[ORM\Column(type: 'boolean', options: ['default' => false])]
24
    private bool $door4 = false;
25
26
    public function getDoor1(): bool
27
    {
28
        return $this->door1;
29
    }
30
31 7
    public function setDoor1(bool $door1): void
32
    {
33 7
        $this->door1 = $door1;
34
    }
35
36
    public function getDoor2(): bool
37
    {
38
        return $this->door2;
39
    }
40
41 7
    public function setDoor2(bool $door2): void
42
    {
43 7
        $this->door2 = $door2;
44
    }
45
46
    public function getDoor3(): bool
47
    {
48
        return $this->door3;
49
    }
50
51 7
    public function setDoor3(bool $door3): void
52
    {
53 7
        $this->door3 = $door3;
54
    }
55
56
    public function getDoor4(): bool
57
    {
58
        return $this->door4;
59
    }
60
61 7
    public function setDoor4(bool $door4): void
62
    {
63 7
        $this->door4 = $door4;
64
    }
65
}
66