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

ArrayEntitiesTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 27
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setEntities() 0 3 1
A getEntities() 0 2 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