Conditions | 4 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | public function __invoke(ContainerInterface $serviceLocator) |
||
28 | 3 | { |
|
29 | $configuration = $serviceLocator->get('Configuration'); |
||
30 | 3 | /** @var RendererInterface $renderer */ |
|
31 | 3 | $renderer = $serviceLocator->get($configuration['mt_mail']['renderer']); |
|
32 | $service = new Composer($renderer); |
||
33 | 3 | ||
34 | $pluginManager = $serviceLocator->get('MtMail\Service\ComposerPluginManager'); |
||
35 | 3 | ||
36 | 3 | if (isset($configuration['mt_mail']['composer_plugins']) |
|
37 | 3 | && is_array($configuration['mt_mail']['composer_plugins']) |
|
38 | 2 | ) { |
|
39 | 2 | foreach (array_unique($configuration['mt_mail']['composer_plugins']) as $plugin) { |
|
40 | 2 | $service->getEventManager()->attachAggregate($pluginManager->get($plugin)); |
|
41 | 2 | } |
|
42 | } |
||
43 | 3 | ||
44 | return $service; |
||
45 | } |
||
46 | } |
||
47 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.