Passed
Push — master ( 30e8f7...8a0955 )
by WEBEWEB
13:45 queued 10:27
created

ArrayEntitiesTrait::setEntities()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 3
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) 2022 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\Traits\Arrays;
13
14
/**
15
 * Array entities trait.
16
 *
17
 * @author webeweb <https://github.com/webeweb>
18
 * @package WBW\Bundle\JQuery\DataTablesBundle\Traits\Arrays
19
 */
20
trait ArrayEntitiesTrait {
21
22
    /**
23
     * Entities.
24
     *
25
     * @var object[]
26
     */
27
    protected $entities;
28
29
    /**
30
     * Get the entities.
31
     *
32
     * @return object[] Returns the entities.
33
     */
34
    public function getEntities(): array {
35
        return $this->entities;
36
    }
37
38
    /**
39
     * Set the entities.
40
     *
41
     * @param object[] $entities The entities.
42
     * @return self Returns this instance.
43
     */
44
    protected function setEntities(array $entities): self {
45
        $this->entities = $entities;
46
        return $this;
47
    }
48
}
49