Completed
Push — master ( c3c5e4...aeed71 )
by Thomas Mauro
03:07 queued 12s
created

HubFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 10
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 1
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 1
    public function __invoke(ContainerInterface $container): HubInterface
15
    {
16 1
        $client = $container->get(ClientInterface::class);
17 1
        Hub::getCurrent()->bindClient($client);
18
19 1
        return Hub::getCurrent();
20
    }
21
}
22