Passed
Push — master ( 9c7250...52994a )
by Adrien
05:50
created

HasDoorAccess   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 88
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 88
ccs 0
cts 19
cp 0
rs 10
c 0
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A setDoor4() 0 3 1
A isDoor4() 0 3 1
A isDoor3() 0 3 1
A isDoor1() 0 3 1
A setDoor2() 0 3 1
A setDoor3() 0 3 1
A setDoor1() 0 3 1
A isDoor2() 0 3 1
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
    /**
15
     * @var bool
16
     * @ORM\Column(type="boolean", options={"default" = 1})
17
     */
18
    private $door1 = true;
19
20
    /**
21
     * @var bool
22
     * @ORM\Column(type="boolean", options={"default" = 1})
23
     */
24
    private $door2 = true;
25
26
    /**
27
     * @var bool
28
     * @ORM\Column(type="boolean", options={"default" = 1})
29
     */
30
    private $door3 = true;
31
32
    /**
33
     * @var bool
34
     * @ORM\Column(type="boolean", options={"default" = 0})
35
     */
36
    private $door4 = false;
37
38
    /**
39
     * @return bool
40
     */
41
    public function isDoor1(): bool
42
    {
43
        return $this->door1;
44
    }
45
46
    /**
47
     * @param bool $door1
48
     */
49
    public function setDoor1(bool $door1): void
50
    {
51
        $this->door1 = $door1;
52
    }
53
54
    /**
55
     * @return bool
56
     */
57
    public function isDoor2(): bool
58
    {
59
        return $this->door2;
60
    }
61
62
    /**
63
     * @param bool $door2
64
     */
65
    public function setDoor2(bool $door2): void
66
    {
67
        $this->door2 = $door2;
68
    }
69
70
    /**
71
     * @return bool
72
     */
73
    public function isDoor3(): bool
74
    {
75
        return $this->door3;
76
    }
77
78
    /**
79
     * @param bool $door3
80
     */
81
    public function setDoor3(bool $door3): void
82
    {
83
        $this->door3 = $door3;
84
    }
85
86
    /**
87
     * @return bool
88
     */
89
    public function isDoor4(): bool
90
    {
91
        return $this->door4;
92
    }
93
94
    /**
95
     * @param bool $door4
96
     */
97
    public function setDoor4(bool $door4): void
98
    {
99
        $this->door4 = $door4;
100
    }
101
}
102