| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | trait DataPositionTrait |
||
| 15 | { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Get the position using the data position |
||
| 19 | * |
||
| 20 | * @return Position|null |
||
| 21 | */ |
||
| 22 | 2 | public function position(): ?Position |
|
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Set the position name |
||
| 33 | * |
||
| 34 | * @param string|null $name |
||
| 35 | */ |
||
| 36 | 2 | public function setName(?string $name): void |
|
| 37 | { |
||
| 38 | 2 | app(DataPosition::class)->update($this->id(), $name, $this->description()); |
|
| 39 | 2 | } |
|
| 40 | |||
| 41 | /** |
||
| 42 | * Set the description |
||
| 43 | * |
||
| 44 | * @param string|null $description |
||
| 45 | */ |
||
| 46 | 2 | public function setDescription(?string $description): void |
|
| 49 | |||
| 50 | } |
||
| 51 | } |