ExperienceController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 11
dl 0
loc 33
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A edit() 0 12 1
A editAuthenticated() 0 4 1
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use Illuminate\Http\Request;
6
use App\Models\Applicant;
7
use App\Http\Controllers\Controller;
8
use Illuminate\Support\Facades\Lang;
9
10
class ExperienceController extends Controller
11
{
12
    /**
13
     * Show the form for editing the logged-in applicant's experience
14
     *
15
     * @param  \Illuminate\Http\Request $request Incoming Request.
16
     * @return \Illuminate\Http\Response
17
     */
18
    public function editAuthenticated(Request $request)
19
    {
20
        $applicant = $request->user()->applicant;
21
        return redirect(route('profile.experience.edit', $applicant));
0 ignored issues
show
Bug introduced by
The function redirect 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

21
        return /** @scrutinizer ignore-call */ redirect(route('profile.experience.edit', $applicant));
Loading history...
Bug introduced by
The function route 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

21
        return redirect(/** @scrutinizer ignore-call */ route('profile.experience.edit', $applicant));
Loading history...
22
    }
23
24
    /**
25
     * Show the form for editing the applicant's experience
26
     *
27
     * @param  \Illuminate\Http\Request $request   Incoming request object.
28
     * @param  \App\Models\Applicant    $applicant Incoming applicant object.
29
     * @return \Illuminate\Http\Response
30
     */
31
    public function edit(Request $request, Applicant $applicant)
32
    {
33
        $custom_breadcrumbs = [
34
            'home' => route('home'),
0 ignored issues
show
Bug introduced by
The function route 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

34
            'home' => /** @scrutinizer ignore-call */ route('home'),
Loading history...
35
            'profile' => '',
36
        ];
37
38
        return view('applicant/profile_02_experience', [
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

38
        return /** @scrutinizer ignore-call */ view('applicant/profile_02_experience', [
Loading history...
39
            'applicant' => $applicant,
40
            'profile' => Lang::get('applicant/profile_experience'),
41
            'custom_breadcrumbs' => $custom_breadcrumbs,
42
            'disable_clone_js' => true,
43
        ]);
44
    }
45
}
46