| Total Complexity | 2 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class UserTransformer extends Transformer |
||
| 16 | { |
||
| 17 | public $include = [ |
||
| 18 | 'roles' => RoleTransformer::class, |
||
| 19 | ]; |
||
| 20 | |||
| 21 | public $available = [ |
||
| 22 | 'accounts' => AccountTransformer::class |
||
| 23 | ]; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Transform the resource into an array. |
||
| 27 | * |
||
| 28 | * @return array |
||
| 29 | */ |
||
| 30 | 7 | public function transformResource() |
|
| 31 | { |
||
| 32 | return [ |
||
| 33 | 7 | 'id' => $this->id, |
|
|
|
|||
| 34 | 7 | 'name' => $this->name, |
|
| 35 | 7 | 'email' => $this->name, |
|
| 36 | 7 | 'email_verified' => $this->email_verified, |
|
| 37 | 7 | 'gender' => $this->gender, |
|
| 38 | 7 | 'provider' => $this->provider, |
|
| 39 | 7 | 'created_at' => $this->created_at, |
|
| 40 | 7 | 'updated_at' => $this->updated_at, |
|
| 41 | ]; |
||
| 42 | } |
||
| 43 | |||
| 44 | 7 | public function transformRoles($roles) |
|
| 47 | } |
||
| 48 | } |
||
| 49 |