Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | 4 | public function __invoke(ContainerInterface $container): Configuration |
|
16 | { |
||
17 | 4 | $jwtSecret = $container->get('config')['mercure']['jwt_secret'] ?? null; |
|
18 | 4 | if ($jwtSecret === null) { |
|
19 | 3 | throw MercureException::missingJwtSecret(); |
|
20 | } |
||
21 | |||
22 | 1 | return Configuration::forSymmetricSigner(new Sha256(), new Key((string) $jwtSecret)); |
|
23 | } |
||
25 |