Total Complexity | 2 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | trait ArrayableTrait |
||
22 | { |
||
23 | use \Yiisoft\Arrays\ArrayableTrait; |
||
24 | |||
25 | /** |
||
26 | * @return array The default implementation returns the names of the relations that have been populated into this |
||
27 | * record. |
||
28 | */ |
||
29 | public function extraFields(): array |
||
30 | { |
||
31 | $fields = array_keys($this->getRelatedRecords()); |
||
32 | |||
33 | return array_combine($fields, $fields); |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @psalm-return array<string, string|Closure> |
||
38 | */ |
||
39 | public function fields(): array |
||
44 | } |
||
45 | } |
||
46 |