Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | trait ColumnsTrait |
||
9 | { |
||
10 | 3 | protected function translateColumn(TableSettings $settings, string $name) : string |
|
11 | { |
||
12 | 3 | return match ($name) { |
|
13 | 1 | 'id' => $settings->idColumnName, |
|
14 | 2 | 'parentId' => $settings->parentIdColumnName, |
|
15 | 1 | 'level' => $settings->levelColumnName, |
|
16 | 1 | 'left' => $settings->leftColumnName, |
|
17 | 1 | 'right' => $settings->rightColumnName, |
|
18 | 1 | 'position' => $settings->positionColumnName, |
|
19 | 3 | default => $name, |
|
20 | 3 | }; |
|
21 | } |
||
22 | |||
23 | 2 | protected function isColumnNameFromBasic(string $name) : bool |
|
29 | 2 | ]); |
|
30 | } |
||
31 | |||
32 | 1 | protected function isColumnNameFromTree(string $name) : bool |
|
40 | 1 | ]); |
|
41 | } |
||
43 |