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