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