Completed
Push — master ( a7d207...6552a7 )
by Daniel
03:56 queued 20s
created

ScalarView   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 28
rs 10
c 0
b 0
f 0

4 Methods

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