Completed
Pull Request — master (#51)
by Daniel
05:05 queued 02:12
created

DateTimeView   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 21
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getTag() 0 4 1
A getValue() 0 4 1
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 $value;
12
    private $tag;
13
14
    public function __construct($value, string $tag = null)
15
    {
16
        $this->value = $value;
17
        $this->tag = $tag;
18
    }
19
20
    public function getTag()
21
    {
22
        return $this->tag;
23
    }
24
25
    public function getValue()
26
    {
27
        return $this->value;
28
    }
29
}
30