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