Passed
Push — master ( 89f24e...8c4dad )
by Sylvain
08:05
created

EventCompleterFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 11
ccs 4
cts 4
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Ecodev\Felix\Log;
6
7
use Interop\Container\ContainerInterface;
8
use Laminas\ServiceManager\Factory\FactoryInterface;
9
10
class EventCompleterFactory implements FactoryInterface
11
{
12
    /**
13
     * @param string $requestedName
14
     */
15 3
    public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): EventCompleter
16
    {
17 3
        $config = $container->get('config');
18 3
        $baseUrl = 'https://' . $config['hostname'];
19
20 3
        return new EventCompleter($baseUrl);
21
    }
22
}
23