Passed
Push — main ( 1d1c5b...83bc52 )
by Daniel
04:23
created

JwtManager   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 2
dl 0
loc 10
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Uxmp\Core\Component\Session;
6
7
use Firebase\JWT\JWT;
8
use Uxmp\Core\Component\Config\ConfigProviderInterface;
9
10
final class JwtManager implements JwtManagerInterface
11
{
12 1
    public function __construct(
13
        private readonly ConfigProviderInterface $config
0 ignored issues
show
Bug introduced by
A parse error occurred: Syntax error, unexpected T_STRING, expecting T_VARIABLE on line 13 at column 25
Loading history...
14
    ) {
15
    }
16
17 1
    public function encode(array $payload): string
18
    {
19 1
        return JWT::encode($payload, $this->config->getJwtSecret());
20
    }
21
}
22