Completed
Push — master ( 8c4272...ef6d68 )
by Thomas Mauro
11s
created

SenderFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 11
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 1
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Facile\SentryModule\Service;
5
6
use Facile\Sentry\Common\Sanitizer\SanitizerInterface;
7
use Facile\Sentry\Common\Sender\Sender;
8
use Facile\Sentry\Common\Sender\SenderInterface;
9
use Facile\Sentry\Common\StackTrace\StackTraceInterface;
10
use Interop\Container\ContainerInterface;
11
use Raven_Client;
12
13
class SenderFactory
14
{
15 1
    public function __invoke(ContainerInterface $container): SenderInterface
16
    {
17
        /** @var Raven_Client $client */
18 1
        $client = $container->get(Raven_Client::class);
19
        /** @var SanitizerInterface $sanitizer */
20 1
        $sanitizer = $container->get(SanitizerInterface::class);
21
        /** @var StackTraceInterface $stackTrace */
22 1
        $stackTrace = $container->get(StackTraceInterface::class);
23
24 1
        return new Sender($client, $sanitizer, $stackTrace);
25
    }
26
}
27