AttachmentParserManagerFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 16
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 1
1
<?php
2
declare(strict_types=1);
3
4
namespace AcMailer\Attachment;
5
6
use Interop\Container\ContainerInterface;
7
use Psr\Container;
8
9
class AttachmentParserManagerFactory
10
{
11
    /**
12
     * @param ContainerInterface $container
13
     * @return AttachmentParserManager
14
     * @throws Container\ContainerExceptionInterface
15
     * @throws Container\NotFoundExceptionInterface
16
     */
17
    public function __invoke(ContainerInterface $container): AttachmentParserManager
18
    {
19
        $config = $container->get('config');
20
        $attachmentParsers = $config['attachment_parsers'] ?? [];
21
22
        return new AttachmentParserManager($container, $attachmentParsers);
23
    }
24
}
25