Completed
Pull Request — master (#331)
by Alejandro
05:29
created

HealthActionFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Shlinkio\Shlink\Rest\Action;
5
6
use Doctrine\ORM\EntityManager;
7
use Psr\Container\ContainerInterface;
8
use Shlinkio\Shlink\Core\Options\AppOptions;
9
10
class HealthActionFactory
11
{
12 1
    public function __invoke(ContainerInterface $container)
13
    {
14 1
        $em = $container->get(EntityManager::class);
15 1
        $options = $container->get(AppOptions::class);
16 1
        $logger = $container->get('Logger_Shlink');
17 1
        return new HealthAction($em->getConnection(), $options, $logger);
18
    }
19
}
20