Passed
Push — task/timeline-congrats-page ( 60126e )
by Yonathan
07:11
created

ApplicationTimelineController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A complete() 0 17 1
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use App\Http\Controllers\Controller;
6
use App\Models\JobApplication;
7
use App\Models\JobPoster;
8
use Illuminate\Support\Facades\Auth;
9
use Illuminate\Support\Facades\Lang;
10
11
class ApplicationTimelineController extends Controller
12
{
13
    /**
14
     * Show the application submission information.
15
     *
16
     * @param  \App\Models\JobPoster $jobPoster Incoming Job Poster object.
17
     * @return \Illuminate\Http\Response
18
     */
19
    public function complete(/* JobPoster $jobPoster */)
20
    {
21
        // Dummy Data
22
        $applicant = Auth::user()->applicant;
23
        $jobPoster = JobPoster::where('job_poster_status_id', '10')->first();
24
        $application = JobApplication::where('job_poster_id', $jobPoster->id)->first();
25
26
        return view(
0 ignored issues
show
Bug introduced by
The function view was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

26
        return /** @scrutinizer ignore-call */ view(
Loading history...
27
            'applicant/application/10-congrats',
28
            [
29
              'applicant' => $applicant,
30
              'application' => $application,
31
              'application_template' => Lang::get(
32
                  'applicant/application_template',
33
                  ['security_clearance' => $jobPoster->security_clearance->value ]
34
              ),
35
              'jobPoster' => $jobPoster,
36
            ]
37
        );
38
    }
39
}
40