Passed
Push — main ( 2e9e01...1bac82 )
by PRATIK
15:02
created

FaqCollection   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 2
dl 0
loc 11
rs 10
c 1
b 0
f 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 3 1
1
<?php
2
3
namespace Adminetic\Website\Http\Resources\Faq;
4
5
use Adminetic\Website\Http\Resources\Faq\FaqResource;
6
use Illuminate\Http\Resources\Json\ResourceCollection;
7
8
class FaqCollection extends ResourceCollection
9
{
10
    /**
11
     * Transform the resource collection into an array.
12
     *
13
     * @param  \Illuminate\Http\Request  $request
14
     * @return array
15
     */
16
    public function toArray($request)
17
    {
18
        return FaqResource::collection($this->collection);
0 ignored issues
show
Bug Best Practice introduced by
The expression return Adminetic\Website...tion($this->collection) returns the type Illuminate\Http\Resource...ymousResourceCollection which is incompatible with the documented return type array.
Loading history...
19
    }
20
}
21