Passed
Push — master ( eb5cf9...d1e5fa )
by Al3x
02:01 queued 24s
created

RequestServiceFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace InvoiceNinjaModule\Service;
5
6
use Interop\Container\ContainerInterface;
7
use InvoiceNinjaModule\Options\ModuleOptions;
8
use InvoiceNinjaModule\Service\Interfaces\RequestServiceInterface;
9
use Laminas\Http\Client;
10
use Laminas\ServiceManager\Factory\FactoryInterface;
11
12
/**
13
 * Class RequestServiceFactory
14
 */
15
class RequestServiceFactory implements FactoryInterface
16
{
17 1
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null) : RequestServiceInterface
18
    {
19 1
        $settingsObj = $container->get(ModuleOptions::class);
20 1
        return new RequestService($settingsObj, new Client());
21
    }
22
}
23