HolidayAbstract::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace HansOtt\Holiday;
4
5
use DateTimeImmutable;
6
7
abstract class HolidayAbstract implements Holiday
8
{
9
    private $beginsAt;
10
11
    private $endsAt;
12
13 4
    public function __construct(DateTimeImmutable $beginsAt, DateTimeImmutable $endsAt)
14
    {
15 4
        $this->beginsAt = $beginsAt;
16 4
        $this->endsAt = $endsAt;
17 4
    }
18
19 2
    final public function beginsAt()
20
    {
21 2
        return $this->beginsAt;
22
    }
23
24 2
    final public function endsAt()
25
    {
26 2
        return $this->endsAt;
27
    }
28
}
29