| 1 | <?php |
||
| 9 | class NotificationController extends Controller |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Undocumented function |
||
| 13 | * |
||
| 14 | * @return void |
||
| 15 | */ |
||
| 16 | public function index() |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Mark a notification as read. |
||
| 23 | * |
||
| 24 | * @return \Illuminate\Http\JsonResponse |
||
| 25 | */ |
||
| 26 | public function markAsRead(Request $request): JsonResponse |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Mark all notifications as read. |
||
| 44 | * |
||
| 45 | * @return \Illuminate\Http\JsonResponse |
||
| 46 | */ |
||
| 47 | public function markAllAsRead(): JsonResponse |
||
| 56 | } |
||
| 57 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: