1 | <?php |
||
8 | class MailHandler implements MailHandlerInterface |
||
9 | { |
||
10 | const STATUS_SENT = 1; |
||
11 | |||
12 | const STATUS_PENDING = 0; |
||
13 | |||
14 | const STATUS_FAILED = 2; |
||
15 | |||
16 | /** |
||
17 | * Find mails |
||
18 | * |
||
19 | * @return mixed |
||
20 | */ |
||
21 | public function findAll() |
||
33 | |||
34 | /** |
||
35 | * @param MailRepositoryInterface $item |
||
36 | * |
||
37 | * @return bool |
||
38 | */ |
||
39 | public function send(MailRepositoryInterface $item): bool |
||
59 | |||
60 | /** |
||
61 | * @param array $ids |
||
62 | * |
||
63 | * @return mixed |
||
64 | */ |
||
65 | public function success(array $ids) |
||
73 | |||
74 | /** |
||
75 | * @param array $ids |
||
76 | * |
||
77 | * @return mixed |
||
78 | */ |
||
79 | public function failed(array $ids) |
||
87 | } |
||
88 |
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: