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 | 'active' => $this->active, |
|
20 | 7 | 'long_url' => $this->long_url, |
|
21 | 7 | 'path' => $this->path, |
|
22 | 7 | 'total_clicks' => $this->total_clicks, |
|
23 | 7 | 'user' => new User($this->whenLoaded('user')), |
|
24 | 7 | 'user_id' => $this->user_id, |
|
25 | 7 | 'created_at' => $this->created_at, |
|
26 | 7 | 'updated_at' => $this->updated_at, |
|
27 | 7 | 'authorized_actions' => $this->authorizedActions(), |
|
28 | ]; |
||
31 |