Completed
Push — master ( 477ca5...2d5ed5 )
by Daniel
10s
created

ScalarView::buildView()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 11
Code Lines 6

Duplication

Lines 6
Ratio 54.55 %

Importance

Changes 0
Metric Value
dl 6
loc 11
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 6
nc 2
nop 3

2 Methods

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