Passed
Push — task/explore-skills-ui ( d41a63...af1244 )
by Yonathan
06:51 queued 10s
created

ApplicantProfile::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace App\Http\Resources;
4
5
use Illuminate\Http\Resources\Json\JsonResource;
6
use Illuminate\Support\Facades\Log;
7
8
class ApplicantProfile extends JsonResource
9
{
10
    /**
11
     * Transform the resource into an array.
12
     *
13
     * @param  \Illuminate\Http\Request  $request
14
     * @return array
15
     */
16
    public function toArray($request)
17
    {
18
        return [
19
            'citizenship_declaration_id' => $this->citizenship_declaration_id,
20
            'veteran_status_id' => $this->veteran_status_id,
21
            'applicant_classifications' => new JsonResource($this->whenLoaded('applicant_classifications')),
22
        ];
23
    }
24
}
25