Total Complexity | 5 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | trait HasTableWithSuffix |
||
6 | { |
||
7 | /** |
||
8 | * Get base table name (root name, without suffix). |
||
9 | * |
||
10 | * @return string |
||
11 | */ |
||
12 | abstract public function getTableNameRoot(): string; |
||
13 | |||
14 | /** |
||
15 | * @inheritDoc |
||
16 | */ |
||
17 | 4 | public function getTable(): string |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * Initialise model with suffixed table name. |
||
32 | * |
||
33 | * @param string|null $suffix |
||
34 | * @return static |
||
35 | */ |
||
36 | 4 | public static function makeUsingSuffix(?string $suffix = null): static |
|
47 |