1 | <?php /** MicroEmailDriver */ |
||
22 | class EmailDriver extends LoggerDriver |
||
23 | { |
||
24 | /** @var string $from email for sender attribute */ |
||
25 | private $from; |
||
26 | /** @var string $type message attribute */ |
||
27 | private $type = 'text/plain'; |
||
28 | /** @var string $to message recipient */ |
||
29 | private $to; |
||
30 | /** @var string $subject message theme */ |
||
31 | private $subject; |
||
32 | |||
33 | |||
34 | /** |
||
35 | * Constructor is a initialize logger |
||
36 | * |
||
37 | * @access public |
||
38 | * |
||
39 | * @param IContainer $container Container |
||
40 | * @param array $params configuration params |
||
41 | * |
||
42 | * @throws \Micro\Base\Exception |
||
43 | * @result void |
||
44 | */ |
||
45 | public function __construct(IContainer $container, array $params = []) |
||
53 | |||
54 | /** |
||
55 | * Send message in log |
||
56 | * |
||
57 | * @access public |
||
58 | * |
||
59 | * @param integer $level level number |
||
60 | * @param string $message message to write |
||
61 | * |
||
62 | * @result void |
||
63 | * @throws \Micro\Base\Exception |
||
64 | */ |
||
65 | public function sendMessage($level, $message) |
||
74 | } |
||
75 |
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: