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

SelectView   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getInputName() 0 4 1
A getValue() 0 4 1
A getVariant() 0 3 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 SelectView implements CellViewInterface
10
{
11
    const INPUT_NAME = '__select__';
12
13
    private $identifier;
14
15
    public function __construct($identifier)
16
    {
17
        $this->identifier = $identifier;
18
    }
19
20
    public function getInputName()
21
    {
22
        return sprintf('%s[%s]', self::INPUT_NAME, $this->identifier);
23
    }
24
25
    public function getValue()
26
    {
27
        return $this->identifier;
28
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33
    public function getVariant()
34
    {
35
    }
36
}
37