RecordCompleterFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

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