| Total Complexity | 7 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | trait SortableTrait |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @ORM\Column(type="integer", nullable=false) |
||
| 19 | * @Assert\NotNull() |
||
| 20 | * @var int |
||
| 21 | */ |
||
| 22 | protected $sort; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return int |
||
| 26 | */ |
||
| 27 | public function getSort(): int |
||
| 28 | { |
||
| 29 | return $this->sort; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param int $sort |
||
| 34 | * @return SortableInterface|SortableTrait |
||
| 35 | */ |
||
| 36 | public function setSort(int $sort = 0): SortableInterface |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param bool|null $sortLast |
||
| 44 | * @return int |
||
| 45 | */ |
||
| 46 | final public function calculateSort(?bool $sortLast = null): int |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return ArrayCollection |
||
| 63 | */ |
||
| 64 | abstract public function getSortCollection(): ArrayCollection; |
||
| 65 | } |
||
| 66 |