ApplicationFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Fabiang\AsseticBundle\Cli;
6
7
use Laminas\ServiceManager\Factory\FactoryInterface;
8
use Psr\Container\ContainerInterface;
9
use Symfony\Component\Console\Application;
10
11
class ApplicationFactory implements FactoryInterface
12
{
13
    /**
14
     * @param string $requestedName
15
     * @return Application
16
     */
17
    public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null)
18
    {
19
        $cliApplication = new Application('AsseticBundle', '3.x');
20
21
        $cliApplication->add(new BuildCommand($container->get('AsseticService')));
22
        $cliApplication->add(new SetupCommand($container->get('AsseticService')));
23
24
        return $cliApplication;
25
    }
26
}
27