SortableTrait   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 5
dl 0
loc 23
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setPosition() 0 3 1
A getPosition() 0 3 1
A getPositionGroup() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * (c) Christian Gripp <[email protected]>
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 Core23\Doctrine\Model\Traits;
13
14
trait SortableTrait
15
{
16
    /**
17
     * @var int|null
18
     */
19
    protected $position;
20
21
    public function setPosition(?int $position): void
22
    {
23
        $this->position = $position;
24
    }
25
26
    public function getPosition(): ?int
27
    {
28
        return $this->position;
29
    }
30
31
    /**
32
     * @return string[]
33
     */
34
    public function getPositionGroup(): array
35
    {
36
        return [];
37
    }
38
}
39