1 | <?php |
||
12 | class SocialProviderManager |
||
13 | { |
||
14 | /** |
||
15 | * @var SocialProvider |
||
16 | */ |
||
17 | protected $social; |
||
18 | |||
19 | /** |
||
20 | * SocialProviderManager constructor. |
||
21 | * @param SocialProvider $social |
||
22 | */ |
||
23 | 51 | public function __construct(SocialProvider $social) |
|
27 | |||
28 | /** |
||
29 | * @param string $key |
||
30 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
||
31 | */ |
||
32 | 24 | public function socialUserQuery(string $key) |
|
36 | |||
37 | /** |
||
38 | * Gets user by unique social identifier. |
||
39 | * |
||
40 | * @param string $key |
||
41 | * @return mixed |
||
42 | */ |
||
43 | 18 | public function getUserByKey(string $key) |
|
47 | |||
48 | /** |
||
49 | * @param SocialAuthenticatable $user |
||
50 | * @param SocialUser $socialUser |
||
51 | */ |
||
52 | 12 | public function attach(SocialAuthenticatable $user, SocialUser $socialUser) |
|
63 | |||
64 | /** |
||
65 | * Create new system user by social user data. |
||
66 | * |
||
67 | * @param Authenticatable $userModel |
||
68 | * @param SocialProvider $social |
||
69 | * @param SocialUser $socialUser |
||
70 | * @return Authenticatable |
||
71 | */ |
||
72 | 6 | public function createNewUser( |
|
92 | } |
||
93 |
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: