Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
ProductPriorityConfigurationResource
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 toArray
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace Domain\Product\Resources;
4
5use Illuminate\Http\Request;
6use Illuminate\Http\Resources\Json\JsonResource;
7
8use Domain\Category\Resources\FamilyResource;
9
10/**
11 * @property int $id
12 * @property string $description
13 * @property string $priority_field
14 * @property string $priority_order
15 */
16class ProductPriorityConfigurationResource extends JsonResource
17{
18
19    public function toArray(Request $request): array
20    {
21        return [
22            'id'             => $this->id,
23            'description'    => $this->description,
24            'priority_field' => $this->priority_field,
25            'priority_order' => $this->priority_order,
26        ];
27    }
28
29}