Total Complexity | 2 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class MediaResourceCollection extends ResourceCollection |
||
8 | { |
||
9 | /** |
||
10 | * Force the resource to use its own array structure instead of possible |
||
11 | * exceptions. |
||
12 | * |
||
13 | * @var bool |
||
14 | */ |
||
15 | public $forceMediaResource = false; |
||
16 | |||
17 | /** |
||
18 | * Create a new resource instance. |
||
19 | * |
||
20 | * @param mixed $resource |
||
21 | * @param bool $forceMediaResource |
||
22 | */ |
||
23 | public function __construct($resource, bool $forceMediaResource = false) |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Transform the resource collection into an array. |
||
32 | * |
||
33 | * @param \Illuminate\Http\Request $request |
||
34 | * @return array |
||
35 | */ |
||
36 | public function toArray($request): array |
||
45 |
This check looks for imports that have been defined, but are not used in the scope.