Failed Conditions
Push — master ( b69c62...c6060f )
by Sébastien
02:49
created

ApiAuthTokenHandlerFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 3
nc 1
nop 1
dl 0
loc 6
c 0
b 0
f 0
cc 1
ccs 0
cts 5
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Handler;
6
7
use App\Service\TokenManager;
8
use Psr\Container\ContainerInterface;
9
10
class ApiAuthTokenHandlerFactory
11
{
12
    public function __invoke(ContainerInterface $container): ApiAuthTokenHandler
13
    {
14
        $userProvider = $container->get(\App\Security\ContredanseUserProvider::class);
15
        $tokenService = $container->get(TokenManager::class);
16
17
        return new ApiAuthTokenHandler($userProvider, $tokenService);
18
    }
19
}
20