Completed
Pull Request — master (#36)
by Daniel
03:38
created

ScalarView   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 getTemplate() 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\View;
8
use Psi\Component\ContentType\View\ViewInterface;
9
use Symfony\Component\OptionsResolver\OptionsResolver;
10
11
class ScalarView implements ViewInterface
12
{
13
    private $template;
14
    private $value;
15
16
    public function __construct(string $template, $value)
17
    {
18
        $this->template = $template;
19
        $this->value = $value;
20
    }
21
22
    public function getTemplate(): string
23
    {
24
        return $this->template;
25
    }
26
27
    public function getValue()
28
    {
29
        return $this->value;
30
    }
31
}
32