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

User   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
dl 0
loc 16
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 8 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