Passed
Push — feature/job-status-transitions ( a07846...768c1a )
by Tristan
04:18
created

User::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 8
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace App\Http\Resources;
4
5
use Illuminate\Http\Resources\Json\JsonResource;
6
7
class User extends JsonResource
8
{
9
    /**
10
     * Transform the resource into an array.
11
     *
12
     * @param  \Illuminate\Http\Request  $request
13
     * @return array
14
     */
15
    public function toArray($request)
16
    {
17
        $userArray = parent::toArray($request);
18
        unset($userArray['applicant']);
19
        unset($userArray['manager']);
20
        unset($userArray['hr_advisor']);
21
22
        return $userArray;
23
    }
24
}
25