Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public static function deleteCandidate(CandidateDeleteRequest $request, $candidateId) |
||
13 | { |
||
14 | $candidate = Candidate::findOrFail($candidateId); |
||
15 | |||
16 | $notificationEmailAddress = null; |
||
17 | if ($request->get('notify_candidate')) { |
||
|
|||
18 | $notificationEmailAddress = $candidate->email; |
||
19 | } |
||
20 | |||
21 | Storage::delete(storage_path('app/'.$candidate->path_to_cv)); |
||
22 | $candidate->path_to_cv = ''; |
||
23 | self::hashData($candidate); |
||
24 | $candidate->save(); |
||
25 | |||
26 | $candidate->delete(); //safe since we use softdeletes |
||
27 | |||
28 | event(new CandidateDeleted($candidate, $notificationEmailAddress)); |
||
29 | } |
||
38 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.