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

HealthActionFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
ccs 5
cts 5
cp 1
crap 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