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

SendMailStrategyFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 3
c 1
b 0
f 0
dl 0
loc 9
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 1
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