Completed
Push — master ( f2324b...cefc4c )
by Daniel
49s
created

DateTimeView::getDateTime()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Psi\Component\ContentType\Standard\View;
6
7
use Psi\Component\ContentType\View\ViewInterface;
8
9
class DateTimeView implements ViewInterface
10
{
11
    private $dateTime;
12
    private $formatted;
13
    private $tag;
14
15
    public function __construct(string $formatted, \DateTime $dateTime, string $tag = null)
16
    {
17
        $this->formatted = $formatted;
18
        $this->dateTime = $dateTime;
19
        $this->tag = $tag;
20
    }
21
22
    public function getTag(): string
23
    {
24
        return $this->tag;
25
    }
26
27
    public function getFormatted(): string
28
    {
29
        return $this->formatted;
30
    }
31
32
    public function getDateTime(): \DateTime
33
    {
34
        return $this->dateTime;
35
    }
36
}
37