akubiczek /
applicake-backend
| 1 | <?php |
||
| 2 | |||
| 3 | namespace App\Policies; |
||
| 4 | |||
| 5 | use App\Models\User; |
||
| 6 | use Illuminate\Auth\Access\HandlesAuthorization; |
||
| 7 | |||
| 8 | class MessagePolicy |
||
| 9 | { |
||
| 10 | use HandlesAuthorization; |
||
| 11 | |||
| 12 | public function list(User $user) |
||
| 13 | { |
||
| 14 | if ($user->can('read all recruitments')) { |
||
| 15 | return true; |
||
| 16 | } |
||
| 17 | |||
| 18 | $candidate = Candidate::findOrFail(request()->get('candidate_id')); |
||
|
0 ignored issues
–
show
|
|||
| 19 | if ($user->can('view', $candidate)) { |
||
| 20 | return true; |
||
| 21 | } |
||
| 22 | |||
| 23 | return false; |
||
| 24 | } |
||
| 25 | } |
||
| 26 |
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.