1 | <?php namespace Arcanesoft\Auth\Http\Controllers\Foundation; |
||
15 | class ProfileController extends Controller |
||
16 | { |
||
17 | /* ------------------------------------------------------------------------------------------------ |
||
18 | | Properties |
||
19 | | ------------------------------------------------------------------------------------------------ |
||
20 | */ |
||
21 | /** |
||
22 | * The authenticated user. |
||
23 | * |
||
24 | * @var \Arcanesoft\Contracts\Auth\Models\User |
||
25 | */ |
||
26 | protected $user; |
||
27 | |||
28 | /* ------------------------------------------------------------------------------------------------ |
||
29 | | Constructor |
||
30 | | ------------------------------------------------------------------------------------------------ |
||
31 | */ |
||
32 | /** |
||
33 | * ProfileController constructor. |
||
34 | */ |
||
35 | public function __construct() |
||
41 | |||
42 | /* ------------------------------------------------------------------------------------------------ |
||
43 | | Main Functions |
||
44 | | ------------------------------------------------------------------------------------------------ |
||
45 | */ |
||
46 | public function index() |
||
55 | |||
56 | public function updatePassword(UpdatePasswordRequest $request, User $user) |
||
67 | |||
68 | /* ------------------------------------------------------------------------------------------------ |
||
69 | | Other Functions |
||
70 | | ------------------------------------------------------------------------------------------------ |
||
71 | */ |
||
72 | /** |
||
73 | * Get the authenticated user. |
||
74 | * |
||
75 | * @return \Arcanesoft\Contracts\Auth\Models\User |
||
76 | */ |
||
77 | private function getAuthenticatedUser() |
||
81 | } |
||
82 |
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: