| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | protected function makeApplicant($id) { |
||
| 16 | //New applicants get a new user |
||
| 17 | $user = User::make(); |
||
| 18 | $user->id = $id; |
||
| 19 | // Make user an Applicant |
||
| 20 | $user->user_role()->associate( |
||
| 21 | UserRole::where('name', 'applicant')->firstOrFail()); |
||
| 22 | |||
| 23 | $userApplicant = new Applicant(); |
||
| 24 | $userApplicant->id = $id; |
||
| 25 | $userApplicant->user()->associate($user); |
||
| 26 | |||
| 27 | return $userApplicant; |
||
| 28 | } |
||
| 30 |