| Total Complexity | 2 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class EloquentTransformer extends Transformer |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Transform the data value to array. |
||
| 9 | * |
||
| 10 | * @return array |
||
| 11 | */ |
||
| 12 | public function toArray(): array |
||
| 13 | { |
||
| 14 | return $this->item->toArray(); |
||
| 15 | } |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Determine which class of object should be transform. |
||
| 19 | * |
||
| 20 | * @return string |
||
| 21 | */ |
||
| 22 | public function objectClass(): string |
||
| 25 | } |
||
| 26 | } |
||
| 27 |