ScheduledCommand::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
crap 1
1
<?php
2
3
namespace MGDigital\BusQue;
4
5
final class ScheduledCommand implements BusQueCommandInterface
6
{
7
8
    private $command;
9
    private $dateTime;
10
    private $id;
11
12 2
    public function __construct($command, \DateTimeInterface $dateTime, string $id = null)
13
    {
14 2
        $this->command = $command;
15 2
        $this->dateTime = $dateTime;
16 2
        $this->id = $id;
17 2
    }
18
19 1
    public function getCommand()
20
    {
21 1
        return $this->command;
22
    }
23
24 1
    public function getDateTime(): \DateTimeInterface
25
    {
26 1
        return $this->dateTime;
27
    }
28
29 1
    public function getId()
30
    {
31 1
        return $this->id;
32
    }
33
}
34