Code Duplication    Length = 17-19 lines in 2 locations

lib/Column/SelectColumn.php 1 location

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

lib/Column/TextColumn.php 1 location

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