| 1 | <?php declare(strict_types=1); |
||
| 13 | * Abstract Part |
||
| 14 | * |
||
| 15 | * Keeps track if the model has a final modifier or not |
||
| 16 | * |
||
| 17 | * @author Thomas Gossmann |
||
| 18 | */ |
||
| 19 | trait FinalPart { |
||
| 20 | |||
| 21 | /** @var bool */ |
||
| 22 | private bool $final = false; |
||
|
|
|||
| 23 | 23 | ||
| 24 | 23 | /** |
|
| 25 | * Returns whether this is final |
||
| 26 | * |
||
| 27 | * @return bool `true` for final and `false` if not |
||
| 28 | */ |
||
| 29 | public function isFinal(): bool { |
||
| 30 | return $this->final; |
||
| 31 | } |
||
| 32 | |||
| 33 | 17 | /** |
|
| 34 | 17 | * Sets this final |
|
| 35 | * |
||
| 36 | 17 | * @param bool $final `true` for final and `false` if not |
|
| 37 | * |
||
| 38 | * @return $this |
||
| 39 | */ |
||
| 46 |