Completed
Push — master ( efafaa...1ce8a3 )
by Avtandil
05:26
created

ArrayResource::getTransformed()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Longman\LaravelLodash\Http\Resources;
6
7
class ArrayResource extends JsonResource
8
{
9
    public function __construct(array $resource)
10
    {
11
        $this->resource = $resource;
12
    }
13
14
    public function getTransformed(): array
15
    {
16
        return $this->resource;
17
    }
18
19
    public function withResourceType(string $resourceType): self
20
    {
21
        $this->resourceType = $resourceType;
22
23
        return $this;
24
    }
25
}
26