1 | <?php |
||
23 | class ExecutorController extends AbstractConsoleController |
||
24 | { |
||
25 | /** |
||
26 | * Менеджер для получения Executor'ов |
||
27 | * |
||
28 | * @var FixtureExecutorManagerInterface |
||
29 | */ |
||
30 | protected $fixtureExecutorManager; |
||
31 | |||
32 | /** |
||
33 | * Разрешенные методы |
||
34 | * |
||
35 | * @var array |
||
36 | */ |
||
37 | protected $allowedMethod = [ |
||
38 | 'import', |
||
39 | 'purge' |
||
40 | ]; |
||
41 | |||
42 | /** |
||
43 | * ExecutorController constructor. |
||
44 | * |
||
45 | * @param FixtureExecutorManagerInterface $fixtureExecutorManager |
||
46 | */ |
||
47 | public function __construct(FixtureExecutorManagerInterface $fixtureExecutorManager) |
||
51 | |||
52 | /** |
||
53 | * Запускает фикстуры |
||
54 | * |
||
55 | * |
||
56 | * @throws \Nnx\DoctrineFixtureModule\Event\Exception\RuntimeException |
||
57 | * @throws \Nnx\DoctrineFixtureModule\Controller\Exception\RuntimeException |
||
58 | */ |
||
59 | public function executeFixtureAction() |
||
84 | |||
85 | /** |
||
86 | * Возвращает список фикстур которые необходимо выпонить |
||
87 | * |
||
88 | * @return array |
||
89 | * @throws \Nnx\DoctrineFixtureModule\Controller\Exception\RuntimeException |
||
90 | */ |
||
91 | protected function getFixtureClassList() |
||
98 | |||
99 | /** |
||
100 | * Возвращает метод для Executor'a |
||
101 | * |
||
102 | * @return string |
||
103 | * @throws \Nnx\DoctrineFixtureModule\Controller\Exception\RuntimeException |
||
104 | */ |
||
105 | public function getExecutorMethod() |
||
122 | |||
123 | /** |
||
124 | * Возвращает имя ObjectManager'a |
||
125 | * |
||
126 | * @return string|null |
||
127 | * @throws \Nnx\DoctrineFixtureModule\Controller\Exception\RuntimeException |
||
128 | */ |
||
129 | protected function getObjectManagerName() |
||
135 | |||
136 | /** |
||
137 | * Возвращает консольный запрос |
||
138 | * |
||
139 | * @return ConsoleRequest |
||
140 | * @throws \Nnx\DoctrineFixtureModule\Controller\Exception\RuntimeException |
||
141 | */ |
||
142 | protected function getConsoleRequest() |
||
152 | |||
153 | /** |
||
154 | * Запук Executor'a |
||
155 | * |
||
156 | * @throws \Nnx\DoctrineFixtureModule\Controller\Exception\RuntimeException |
||
157 | * @throws \Nnx\DoctrineFixtureModule\Event\Exception\RuntimeException |
||
158 | */ |
||
159 | public function runExecutorAction() |
||
178 | |||
179 | /** |
||
180 | * Запуск выполнения фикстур |
||
181 | * |
||
182 | * @param ExecutorInterface $executor |
||
183 | * @param $method |
||
184 | * @param array $contextData |
||
185 | */ |
||
186 | protected function runFixture(ExecutorInterface $executor, $method, array $contextData = []) |
||
214 | |||
215 | |||
216 | /** |
||
217 | * Вовзращает имя Executor'a |
||
218 | * |
||
219 | * @return string |
||
220 | * @throws \Nnx\DoctrineFixtureModule\Controller\Exception\RuntimeException |
||
221 | */ |
||
222 | public function getExecutorName() |
||
234 | |||
235 | |||
236 | /** |
||
237 | * Возвращает менеджер для получения Executor'ов |
||
238 | * |
||
239 | * @return FixtureExecutorManagerInterface |
||
240 | */ |
||
241 | public function getFixtureExecutorManager() |
||
245 | |||
246 | /** |
||
247 | * Устанавливает менеджер для получения Executor'ов |
||
248 | * |
||
249 | * @param FixtureExecutorManagerInterface $fixtureExecutorManager |
||
250 | * |
||
251 | * @return $this |
||
252 | */ |
||
253 | public function setFixtureExecutorManager($fixtureExecutorManager) |
||
259 | } |
||
260 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.