Completed
Branch master (d9d9e6)
by Thomas Mauro
05:00
created

HubFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Facile\SentryModule\Service;
6
7
use Psr\Container\ContainerInterface;
8
use Sentry\ClientInterface;
9
use Sentry\State\Hub;
10
use Sentry\State\HubInterface;
11
12
final class HubFactory
13
{
14
    public function __invoke(ContainerInterface $container): HubInterface
15
    {
16
        $client = $container->get(ClientInterface::class);
17
        Hub::getCurrent()->bindClient($client);
18
19
        return Hub::getCurrent();
20
    }
21
}
22