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