1 | <?php |
||
39 | 1 | class ClientCommand extends Console\Command\Command |
|
40 | { |
||
41 | /** |
||
42 | * @var Client\IClient |
||
43 | */ |
||
44 | private $client; |
||
45 | |||
46 | /** |
||
47 | * @var Log\LoggerInterface|Log\NullLogger|NULL |
||
48 | */ |
||
49 | private $logger; |
||
50 | |||
51 | /** |
||
52 | * @var bool |
||
53 | */ |
||
54 | private $isRunning = FALSE; |
||
55 | |||
56 | /** |
||
57 | * @param Client\IClient $client |
||
58 | * @param Log\LoggerInterface|NULL $logger |
||
59 | * @param string|NULL $name |
||
60 | */ |
||
61 | public function __construct( |
||
71 | |||
72 | /** |
||
73 | * @param Log\LoggerInterface $logger |
||
74 | * |
||
75 | * @return void |
||
76 | */ |
||
77 | public function setLogger(Log\LoggerInterface $logger) : void |
||
85 | |||
86 | /** |
||
87 | * @return void |
||
88 | */ |
||
89 | protected function configure() |
||
95 | |||
96 | /** |
||
97 | * {@inheritdoc} |
||
98 | */ |
||
99 | protected function execute(Input\InputInterface $input, Output\OutputInterface $output) |
||
125 | } |
||
126 |
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: