Conditions | 4 |
Paths | 8 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | public function read($id) |
||
33 | { |
||
34 | $notification = Notification::findOrFail($id); |
||
35 | if ($notification->user_id != Auth::user()->id) { |
||
36 | abort(403); |
||
37 | } |
||
38 | if (empty($notification->readed_at)) { |
||
39 | $notification->readed_at = Carbon::now(); |
||
40 | $notification->save(); |
||
41 | event(new NotificationWasReaded($notification)); |
||
42 | } |
||
43 | event(new NotificationWasOpened($notification)); |
||
44 | if (!empty($notification->link)) { |
||
45 | return redirect()->to($notification->link); |
||
46 | } |
||
47 | return redirect()->route('notifications.index'); |
||
48 | } |
||
49 | } |
||
50 |
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.