DataTablesMapping   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 76
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 7
eloc 13
dl 0
loc 76
c 0
b 0
f 0
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getParent() 0 2 1
A setColumn() 0 3 1
A setPrefix() 0 3 1
A setParent() 0 3 1
A getColumn() 0 2 1
A __construct() 0 1 1
A getPrefix() 0 2 1
1
<?php
2
3
/*
4
 * This file is part of the jquery-datatables-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\JQuery\DataTablesBundle\Model;
13
14
use WBW\Bundle\JQuery\DataTablesBundle\Api\DataTablesColumnInterface;
15
use WBW\Bundle\JQuery\DataTablesBundle\Api\DataTablesMappingInterface;
16
17
/**
18
 * DataTables mapping.
19
 *
20
 * @author webeweb <https://github.com/webeweb>
21
 * @package WBW\Bundle\JQuery\DataTablesBundle\Model
22
 */
23
class DataTablesMapping implements DataTablesMappingInterface {
24
25
    /**
26
     * Column.
27
     *
28
     * @var string|null
29
     */
30
    private $column;
31
32
    /**
33
     * Parent.
34
     *
35
     * @var DataTablesColumnInterface|null
36
     */
37
    private $parent;
38
39
    /**
40
     * Prefix.
41
     *
42
     * @var string|null
43
     */
44
    private $prefix;
45
46
    /**
47
     * Constructor.
48
     */
49
    public function __construct() {
50
        // NOTHING TO DO
51
    }
52
53
    /**
54
     * {@inheritDoc}
55
     */
56
    public function getColumn(): ?string {
57
        return $this->column;
58
    }
59
60
    /**
61
     * {@inheritDoc}
62
     */
63
    public function getParent(): ?DataTablesColumnInterface {
64
        return $this->parent;
65
    }
66
67
    /**
68
     * {@inheritDoc}
69
     */
70
    public function getPrefix(): ?string {
71
        return $this->prefix;
72
    }
73
74
    /**
75
     * {@inheritDoc}
76
     */
77
    public function setColumn(?string $column): DataTablesMappingInterface {
78
        $this->column = $column;
79
        return $this;
80
    }
81
82
    /**
83
     * Set the parent.
84
     *
85
     * @param DataTablesColumnInterface|null $parent The parent.
86
     * @return DataTablesMappingInterface Returns this mapping.
87
     */
88
    public function setParent(?DataTablesColumnInterface $parent): DataTablesMappingInterface {
89
        $this->parent = $parent;
90
        return $this;
91
    }
92
93
    /**
94
     * {@inheritDoc}
95
     */
96
    public function setPrefix(?string $prefix): DataTablesMappingInterface {
97
        $this->prefix = $prefix;
98
        return $this;
99
    }
100
}
101