Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | 7 | public function toArray($request) |
|
16 | { |
||
17 | return [ |
||
18 | 7 | 'id' => $this->id, |
|
|
|||
19 | 7 | 'name' => $this->name, |
|
20 | 7 | 'permissions' => $this->permissions, |
|
21 | 7 | 'user' => new User($this->whenLoaded('user')), |
|
22 | 7 | 'user_id' => $this->user_id, |
|
23 | 7 | 'last_used_at' => $this->last_used_at, |
|
24 | 7 | 'created_at' => $this->created_at, |
|
25 | 7 | 'updated_at' => $this->updated_at, |
|
26 | 7 | 'plain_text_token' => $this->when($this->plain_text_token, $this->plain_text_token), |
|
27 | 7 | 'authorized_actions' => $this->authorizedActions(), |
|
28 | ]; |
||
31 |