Conditions | 2 |
Paths | 2 |
Total Lines | 27 |
Code Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | public function toArray($request) |
||
22 | { |
||
23 | $array = [ |
||
24 | 'id' => $this->id, |
||
|
|||
25 | 'created_at' => $this->created_at, |
||
26 | 'name' => $this->name, |
||
27 | 'email' => $this->email, |
||
28 | 'phone_number' => PhoneFormatter::format($this->phone_number), |
||
29 | 'photo_path' => $this->photo_path ? env('AVATARS_URL').'/'.$this->photo_path : null, |
||
30 | 'recruitment_id' => $this->recruitment_id, |
||
31 | 'stage_id' => $this->stage_id, |
||
32 | 'seen_at' => $this->seen_at, |
||
33 | 'rate' => $this->rate, |
||
34 | 'recruitment' => $this->recruitment, |
||
35 | 'stage' => $this->stage, |
||
36 | ]; |
||
37 | |||
38 | unset($array['stage']['created_at']); |
||
39 | unset($array['stage']['updated_at']); |
||
40 | unset($array['stage']['recruitment_id']); |
||
41 | unset($array['recruitment']['created_at']); |
||
42 | unset($array['recruitment']['updated_at']); |
||
43 | unset($array['recruitment']['deleted_at']); |
||
44 | unset($array['recruitment']['is_draft']); |
||
45 | unset($array['recruitment']['notification_email']); |
||
46 | |||
47 | return $array; |
||
48 | } |
||
50 |