Passed
Push — v3_compat ( af37b8...c7ae23 )
by Mateusz
03:38
created

MailServiceFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
ccs 7
cts 7
cp 1
rs 9.4285
cc 1
eloc 6
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * MtMail - e-mail module for Zend Framework 2
4
 *
5
 * @link      http://github.com/mtymek/MtMail
6
 * @copyright Copyright (c) 2013-2014 Mateusz Tymek
7
 * @license   BSD 2-Clause
8
 */
9
10
namespace MtMail\Factory;
11
12
use Interop\Container\ContainerInterface;
13
use MtMail\Service\Mail;
14
15
class MailServiceFactory
16
{
17 1
    public function __invoke(ContainerInterface $serviceLocator)
18
    {
19 1
        $service = new Mail(
20 1
            $serviceLocator->get('MtMail\Service\Composer'),
21 1
            $serviceLocator->get('MtMail\Service\Sender'),
22 1
            $serviceLocator->get('MtMail\Service\TemplateManager')
23 1
        );
24
25 1
        return $service;
26
    }
27
}
28