Completed
Push — master ( aef7f8...916348 )
by WEBEWEB
01:35
created

DataTablesWrapperTrait::setWrapper()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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\DataTablesWrapperInterface;
15
16
/**
17
 * DataTables wrapper trait.
18
 *
19
 * @author webeweb <https://github.com/webeweb/>
20
 * @package WBW\Bundle\JQuery\DataTablesBundle\Model
21
 */
22
trait DataTablesWrapperTrait {
23
24
    /**
25
     * Wrapper.
26
     *
27
     * @var DataTablesWrapperInterface|null
28
     */
29
    private $wrapper;
30
31
    /**
32
     * Get the the wrapper.
33
     *
34
     * @return DataTablesWrapperInterface|null Returns the wrapper.
35
     */
36
    public function getWrapper(): ?DataTablesWrapperInterface {
37
        return $this->wrapper;
38
    }
39
40
    /**
41
     * Set the wrapper.
42
     *
43
     * @param DataTablesWrapperInterface|null $wrapper The wrapper.
44
     * @return self Returns this instance.
45
     */
46
    protected function setWrapper(?DataTablesWrapperInterface $wrapper): self {
47
        $this->wrapper = $wrapper;
48
        return $this;
49
    }
50
}
51