Passed
Push — master ( e9c651...e1baf6 )
by Christian
02:19
created

SortableTrait::getPosition()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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
    /**
22
     * @param int|null $position
23
     */
24
    public function setPosition(?int $position): void
25
    {
26
        $this->position = $position;
27
    }
28
29
    /**
30
     * @return int|null
31
     */
32
    public function getPosition(): ?int
33
    {
34
        return $this->position;
35
    }
36
37
    /**
38
     * @return string[]
39
     */
40
    public function getPositionGroup(): array
41
    {
42
        return [];
43
    }
44
}
45