HasDoorAccess   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 8
eloc 17
c 1
b 0
f 0
dl 0
loc 52
ccs 8
cts 16
cp 0.5
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A setDoor4() 0 3 1
A getDoor3() 0 3 1
A getDoor4() 0 3 1
A getDoor2() 0 3 1
A setDoor2() 0 3 1
A getDoor1() 0 3 1
A setDoor3() 0 3 1
A setDoor1() 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
    #[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