Completed
Pull Request — master (#29)
by Daniel
02:17
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 getView() 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\CellInterface;
8
9
class SelectCell implements CellInterface
10
{
11
    const INPUT_NAME = 'selected_identifiers';
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 getView()
34
    {
35
    }
36
}
37