Completed
Push — master ( c32796...5fbd22 )
by Daniel
03:30
created

ScalarView   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 35
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getTemplate() 0 4 1
A getTag() 0 4 1
A getValue() 0 4 1
A isRaw() 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 ScalarView implements ViewInterface
10
{
11
    private $template;
12
    private $value;
13
    private $raw;
14
    private $tag;
15
16
    public function __construct(string $template, $value, string $tag = null, bool $raw)
17
    {
18
        $this->template = $template;
19
        $this->value = $value;
20
        $this->tag = $tag;
21
        $this->raw = $raw;
22
    }
23
24
    public function getTemplate(): string
25
    {
26
        return $this->template;
27
    }
28
29
    public function getTag()
30
    {
31
        return $this->tag;
32
    }
33
34
    public function getValue()
35
    {
36
        return $this->value;
37
    }
38
39
    public function isRaw()
40
    {
41
        return $this->raw;
42
    }
43
}
44