Code Duplication    Length = 18-20 lines in 2 locations

lib/Column/SelectColumn.php 1 location

@@ 11-30 (lines=20) @@
8
use Psi\Component\Grid\View\Cell;
9
use Symfony\Component\OptionsResolver\OptionsResolver;
10
11
class SelectColumn implements ColumnInterface
12
{
13
    const INPUT_NAME = '_select';
14
15
    public function buildCell(Cell $cell, array $options)
16
    {
17
        $cell->template = 'Select';
18
        $cell->parameters['input_name'] = self::INPUT_NAME;
19
    }
20
21
    public function configureOptions(OptionsResolver $options)
22
    {
23
        $options->setDefault('property', 'id');
24
    }
25
26
    public function getParent()
27
    {
28
        return PropertyColumn::class;
29
    }
30
}
31

lib/Column/TextColumn.php 1 location

@@ 11-28 (lines=18) @@
8
use Psi\Component\Grid\View\Cell;
9
use Symfony\Component\OptionsResolver\OptionsResolver;
10
11
class TextColumn implements ColumnInterface
12
{
13
    public function buildCell(Cell $cell, array $options)
14
    {
15
        $cell->template = 'Text';
16
        $cell->parameters['truncate'] = $options['truncate'];
17
    }
18
19
    public function configureOptions(OptionsResolver $options)
20
    {
21
        $options->setDefault('truncate', null);
22
    }
23
24
    public function getParent()
25
    {
26
        return PropertyColumn::class;
27
    }
28
}
29