MailServiceFactory::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 6
cts 6
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 1
crap 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\Composer;
14
use MtMail\Service\Mail;
15
use MtMail\Service\Sender;
16
use MtMail\Service\TemplateManager;
17
18
class MailServiceFactory
19
{
20 1
    public function __invoke(ContainerInterface $serviceLocator)
21
    {
22 1
        $service = new Mail(
23 1
            $serviceLocator->get(Composer::class),
24 1
            $serviceLocator->get(Sender::class),
25 1
            $serviceLocator->get(TemplateManager::class)
26
        );
27
28 1
        return $service;
29
    }
30
}
31