Completed
Pull Request — master (#28)
by Daniel
02:29
created

SelectCell   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

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\View\Cell;
6
7
use Psi\Component\Grid\ColumnInterface;
8
use Psi\Component\Grid\CellInterface;
9
10
class SelectCell implements CellInterface
11
{
12
    const INPUT_NAME = '__select__';
13
14
    private $identifier;
15
16
    public function __construct($identifier)
17
    {
18
        $this->identifier = $identifier;
19
    }
20
21
    public function getInputName()
22
    {
23
        return sprintf('%s[%s]', self::INPUT_NAME, $this->identifier);
24
    }
25
26
    public function getValue()
27
    {
28
        return $this->identifier;
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function getVariant()
35
    {
36
    }
37
}
38