Test Failed
Branch issue/#3 (7deea8)
by Koldo
05:23
created

MakeConsoleCommandCommandFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Antidot\DevTools\Container;
6
7
use Antidot\DevTools\Application\Command\MakeConsoleCommand;
8
use Antidot\DevTools\Application\Service\CreateClassFile;
9
use Antidot\DevTools\Application\Service\GetClassNameFromFQCN;
10
use Antidot\DevTools\Application\Service\GetNamespaceFromFQCN;
11
use Antidot\DevTools\Application\Service\GetRealPathFromNamespace;
12
use Psr\Container\ContainerInterface;
13
14
class MakeConsoleCommandCommandFactory
15
{
16
    public function __invoke(ContainerInterface $container): MakeConsoleCommand
17
    {
18
        return new MakeConsoleCommand(
19
            $container->get(GetClassNameFromFQCN::class),
20
            $container->get(GetNamespaceFromFQCN::class),
21
            $container->get(GetRealPathFromNamespace::class),
22
            $container->get(CreateClassFile::class),
23
            (array)$container->get('config')
24
        );
25
    }
26
}
27