SendJobFactory::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
/**
4
 * Mailer Queue Component (http://mateuszsitek.com/projects/mailer-component-queue)
5
 *
6
 * @copyright Copyright (c) 2017 DIGITAL WOLVES LTD (http://digitalwolves.ltd) All rights reserved.
7
 * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
8
 */
9
10
namespace Aist\Mailer\Component\Queue\Job;
11
12
use Interop\Container\ContainerInterface;
13
use Psr\Log\LoggerInterface;
14
15
/**
16
 * Class SendJobFactory
17
 */
18
class SendJobFactory
19
{
20
    /**
21
     * @param ContainerInterface $container
22
     *
23
     * @return SendJob
24
     */
25
    public function __invoke(ContainerInterface $container)
26
    {
27
        $mailer = $container->get('mailer');
28
        $logger = $container->get(LoggerInterface::class);
29
30
        return new SendJob($mailer, $logger);
31
    }
32
}
33