Passed
Push — master ( d04c5a...d84490 )
by Mathias
24:28 queued 14:22
created

SendMailStrategyFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 7
rs 10
cc 1
nc 1
nop 3
1
<?php
2
3
/**
4
 * YAWIK
5
 *
6
 * @see       https://github.com/cross-solution/YAWIK for the canonical source repository
7
 * @copyright https://github.com/cross-solution/YAWIK/blob/master/COPYRIGHT
8
 * @license   https://github.com/cross-solution/YAWIK/blob/master/LICENSE
9
 */
10
11
declare(strict_types=1);
12
13
namespace Core\Queue\Strategy;
14
15
use Psr\Container\ContainerInterface;
16
17
/**
18
 * Factory for \Core\Queue\Strategy\SendMailStrategy
19
 *
20
 * @author Mathias Gelhausen
21
 * TODO: write tests
22
 */
23
class SendMailStrategyFactory
24
{
25
    public function __invoke(
26
        ContainerInterface $container,
27
        string $requestedName,
28
        ?array $options = null
29
    ): SendMailStrategy {
30
        return new SendMailStrategy(
31
            $container->get('Core/MailService')
32
        );
33
    }
34
}
35