| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function transform(Tenant $tenant): array |
||
| 19 | { |
||
| 20 | $country = $tenant->country_code ? country($tenant->country_code) : null; |
||
| 21 | $language = $tenant->language_code ? language($tenant->language_code) : null; |
||
| 22 | |||
| 23 | return $this->escape([ |
||
| 24 | 'id' => (string) $tenant->getRouteKey(), |
||
| 25 | 'name' => (string) $tenant->name, |
||
| 26 | 'email' => (string) $tenant->email, |
||
| 27 | 'phone' => (string) $tenant->phone, |
||
| 28 | 'country_code' => (string) optional($country)->getName(), |
||
| 29 | 'country_emoji' => (string) optional($country)->getEmoji(), |
||
| 30 | 'language_code' => (string) optional($language)->getName(), |
||
| 31 | 'created_at' => (string) $tenant->created_at, |
||
| 32 | 'updated_at' => (string) $tenant->updated_at, |
||
| 33 | ]); |
||
| 34 | } |
||
| 35 | } |
||
| 36 |