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

TestimonialCollection::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
b 0
f 1
1
<?php
2
3
namespace Adminetic\Website\Http\Resources\Testimonial;
4
5
use Adminetic\Website\Http\Resources\Testimonial\TestimonialResource;
6
use Illuminate\Http\Resources\Json\ResourceCollection;
7
8
class TestimonialCollection 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 TestimonialResource::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