| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | public function toResponse($request) |
||
| 13 | { |
||
| 14 | return new Collection( |
||
|
|
|||
| 15 | Resource::collection( |
||
| 16 | File::visible() |
||
| 17 | ->with(['createdBy.avatar', 'attachable']) |
||
| 18 | ->forUser($request->user()) |
||
| 19 | ->between(json_decode($request->get('interval'))) |
||
| 20 | ->filter($request->get('query')) |
||
| 21 | ->ordered() |
||
| 22 | ->skip($request->get('offset')) |
||
| 23 | ->take(config('enso.files.paginate')) |
||
| 24 | ->get() |
||
| 25 | ) |
||
| 29 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: