| Conditions | 4 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 3 | public function __invoke(ContainerInterface $serviceLocator) |
|
| 29 | { |
||
| 30 | 3 | $configuration = $serviceLocator->get('Configuration'); |
|
| 31 | /** @var RendererInterface $renderer */ |
||
| 32 | 3 | $renderer = $serviceLocator->get($configuration['mt_mail']['renderer']); |
|
| 33 | 3 | $service = new Composer($renderer); |
|
| 34 | |||
| 35 | 3 | $pluginManager = $serviceLocator->get(ComposerPluginManager::class); |
|
| 36 | |||
| 37 | 3 | if (isset($configuration['mt_mail']['composer_plugins']) |
|
| 38 | 3 | && is_array($configuration['mt_mail']['composer_plugins']) |
|
| 39 | ) { |
||
| 40 | 2 | foreach (array_unique($configuration['mt_mail']['composer_plugins']) as $plugin) { |
|
| 41 | 2 | $pluginManager->get($plugin)->attach($service->getEventManager()); |
|
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | 3 | return $service; |
|
| 46 | } |
||
| 47 | } |
||
| 48 |
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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.