ComposerPluginManagerFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 12
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 9 1
1
<?php
2
/**
3
 * MtMail - e-mail module for Zend Framework
4
 *
5
 * @link      http://github.com/mtymek/MtMail
6
 * @copyright Copyright (c) 2013-2017 Mateusz Tymek
7
 * @license   BSD 2-Clause
8
 */
9
10
namespace MtMail\Factory;
11
12
use Interop\Container\ContainerInterface;
13
use MtMail\Service\ComposerPluginManager;
14
use Zend\ServiceManager\Config;
15
16
class ComposerPluginManagerFactory
17
{
18 1
    public function __invoke(ContainerInterface $serviceLocator)
19
    {
20 1
        $config = $serviceLocator->get('Configuration');
21 1
        $serviceConfig = new Config($config['mt_mail']['composer_plugin_manager']);
22 1
        $service = new ComposerPluginManager($serviceLocator);
23 1
        $serviceConfig->configureServiceManager($service);
24
25 1
        return $service;
26
    }
27
}
28