Completed
Pull Request — master (#26)
by Daniel
04:04 queued 01:49
created

ScalarView   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getValue() 0 4 1
A getVariant() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Psi\Component\Grid\Cell\View;
6
7
use Psi\Component\Grid\CellViewInterface;
8
9
class ScalarView implements CellViewInterface
10
{
11
    private $value;
12
    private $variant;
13
14
    public function __construct(string $variant = null, $value)
15
    {
16
        $this->value = $value;
17
        $this->variant = $variant;
18
    }
19
20
    public function getValue()
21
    {
22
        return $this->value;
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function getVariant()
29
    {
30
        return $this->variant;
31
    }
32
}
33