1 | <?php |
||
11 | class SocialAuth |
||
12 | { |
||
13 | /** |
||
14 | * @var int |
||
15 | */ |
||
16 | private $provider; |
||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | private $providerId; |
||
21 | /** |
||
22 | * @var ClientInterface |
||
23 | */ |
||
24 | private $client; |
||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | public $parsers; |
||
29 | |||
30 | public function __construct(ClientInterface $client) |
||
36 | |||
37 | public function prepareUser(): ?User |
||
63 | |||
64 | private function parser() |
||
69 | } |
||
70 |
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: