JWEDecrypterFactoryFactory::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace TMV\JWTModule\DIFactory\Encryption;
6
7
use Jose\Component\Core\AlgorithmManagerFactory;
8
use Jose\Component\Encryption\Compression\CompressionMethodManagerFactory;
9
use Jose\Component\Encryption\JWEDecrypterFactory;
10
use Psr\Container\ContainerInterface;
11
12
class JWEDecrypterFactoryFactory
13
{
14 7
    public function __invoke(ContainerInterface $container): JWEDecrypterFactory
15
    {
16 7
        $algorithmManagerFactory = $container->get(AlgorithmManagerFactory::class);
17 7
        $compressionMethodManagerFactory = $container->get(CompressionMethodManagerFactory::class);
18
19 7
        return new JWEDecrypterFactory(
20 7
            $algorithmManagerFactory,
21
            $compressionMethodManagerFactory
22
        );
23
    }
24
}
25