Passed
Push — task/job-get-classification ( edd1e4...41ede6 )
by
unknown
05:56 queued 11s
created

ClassificationsController::getClassifications()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 15
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Http\Controllers;
4
use App\Models\Classification;
5
6
use Illuminate\Http\Request;
7
8
class ClassificationsController extends Controller
9
{
10
    /**
11
     * Return the current applicant's application for a given Job Poster.
12
     *
13
     * @param  \App\Models\JobPoster $jobPoster Incoming JobPoster object.
14
     * @return mixed|\App\Models\JobApplication
15
     */
16
    public function getClassifications()
17
    {
18
        /*
19
        $application = JobApplication::where('applicant_id', Auth::user()->applicant->id)
20
            ->where('job_poster_id', $jobPoster->id)->first();
21
        if ($application == null) {
22
            $application = new JobApplication();
23
            $application->job_poster_id = $jobPoster->id;
24
            $application->applicant_id = Auth::user()->applicant->id;
25
            $application->application_status_id = ApplicationStatus::where('name', 'draft')->firstOrFail()->id;
26
            $application->save();
27
        }
28
        return $application;
29
        */
30
        return Classification::all();
31
    }
32
}
33