1 | <?php |
||
40 | abstract class AbstractConsolePlugin extends AbstractPlugin |
||
41 | { |
||
42 | |||
43 | /** |
||
44 | * The M2IF console application instance. |
||
45 | * |
||
46 | * @var Application |
||
47 | */ |
||
48 | protected $cliApplication; |
||
49 | |||
50 | /** |
||
51 | * The console input instance. |
||
52 | * |
||
53 | * @var InputInterface |
||
54 | */ |
||
55 | protected $input; |
||
56 | |||
57 | /** |
||
58 | * The console output instance. |
||
59 | * |
||
60 | * @var OutputInterface |
||
61 | */ |
||
62 | protected $output; |
||
63 | |||
64 | /** |
||
65 | * The helper set. |
||
66 | * |
||
67 | * @var HelperSet |
||
68 | */ |
||
69 | protected $helperSet; |
||
70 | |||
71 | /** |
||
72 | * AbstractConsolePlugin constructor |
||
73 | * |
||
74 | * @param ApplicationInterface $application |
||
75 | * |
||
76 | * @throws \Exception |
||
77 | */ |
||
78 | public function __construct(ApplicationInterface $application) |
||
111 | |||
112 | /** |
||
113 | * Returns the import cli application instance. |
||
114 | * |
||
115 | * @return \TechDivision\Import\Cli\Application |
||
116 | */ |
||
117 | public function getCliApplication() |
||
121 | |||
122 | /** |
||
123 | * @param \TechDivision\Import\Cli\Application $cliApplication |
||
124 | * |
||
125 | * @return void |
||
126 | */ |
||
127 | public function setCliApplication(Application $cliApplication) |
||
131 | |||
132 | /** |
||
133 | * Returns the console input instance. |
||
134 | * |
||
135 | * @return \Symfony\Component\Console\Input\InputInterface |
||
136 | */ |
||
137 | public function getInput() |
||
141 | |||
142 | /** |
||
143 | * @param \Symfony\Component\Console\Input\InputInterface $input |
||
144 | * |
||
145 | * @return void |
||
146 | */ |
||
147 | public function setInput(InputInterface $input) |
||
151 | |||
152 | /** |
||
153 | * Returns the console output instance. |
||
154 | * |
||
155 | * @return \Symfony\Component\Console\Output\OutputInterface |
||
156 | */ |
||
157 | public function getOutput() |
||
161 | |||
162 | /** |
||
163 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
164 | * |
||
165 | * @return void |
||
166 | */ |
||
167 | public function setOutput(OutputInterface $output) |
||
171 | |||
172 | /** |
||
173 | * Returns the helper set. |
||
174 | * |
||
175 | * @return \Symfony\Component\Console\Helper\HelperSet |
||
176 | */ |
||
177 | public function getHelperSet() |
||
181 | |||
182 | /** |
||
183 | * @param HelperSet $helperSet |
||
184 | * |
||
185 | * @return void |
||
186 | */ |
||
187 | public function setHelperSet(HelperSet $helperSet) |
||
191 | |||
192 | /** |
||
193 | * Retrieve a helper by name. |
||
194 | * |
||
195 | * @param string $name The name of the helper to retrieve |
||
196 | * |
||
197 | * @return HelperInterface |
||
198 | */ |
||
199 | public function getHelper($name) |
||
203 | } |
||
204 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.json
file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.json
to be in the root folder of your repository.Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the
require
orrequire-dev
section?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceof
checks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.