AddEvent::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 4
crap 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace PersonalGalaxy\Calendar\Command;
5
6
use PersonalGalaxy\Calendar\Entity\{
7
    Event\Identity,
8
    Event\Name,
9
    Event\Slot,
10
    Agenda\Identity as Agenda,
11
};
12
13
final class AddEvent
14
{
15
    private $identity;
16
    private $agenda;
17
    private $name;
18
    private $slot;
19
20 4
    public function __construct(
21
        Identity $identity,
22
        Agenda $agenda,
23
        Name $name,
24
        Slot $slot
25
    ) {
26 4
        $this->identity = $identity;
27 4
        $this->agenda = $agenda;
28 4
        $this->name = $name;
29 4
        $this->slot = $slot;
30 4
    }
31
32 2
    public function identity(): Identity
33
    {
34 2
        return $this->identity;
35
    }
36
37 3
    public function agenda(): Agenda
38
    {
39 3
        return $this->agenda;
40
    }
41
42 2
    public function name(): Name
43
    {
44 2
        return $this->name;
45
    }
46
47 4
    public function slot(): Slot
48
    {
49 4
        return $this->slot;
50
    }
51
}
52