HelloCommand::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Feature\Framework\DocBlockServiceAware\Module\Infrastructure\Command;
6
7
use Gacela\Framework\ServiceResolverAwareTrait;
8
use GacelaTest\Feature\Framework\DocBlockServiceAware\Module\Infrastructure\Persistence\CustomHelloRepository;
9
use Symfony\Component\Console\Command\Command;
10
use Symfony\Component\Console\Input\InputInterface;
11
use Symfony\Component\Console\Output\OutputInterface;
12
13
/**
14
 * @method CustomHelloRepository getRepository()
15
 * @method RepositoryInSameNamespace getRepositoryInSameNamespace()
16
 */
17
final class HelloCommand extends Command
18
{
19
    use ServiceResolverAwareTrait;
20
21
    protected function execute(InputInterface $input, OutputInterface $output): int
22
    {
23
        $output->writeln($this->getRepository()->findNameById(1));
24
        $output->write($this->getRepositoryInSameNamespace()->findNameById(2));
25
26
        return self::SUCCESS;
27
    }
28
}
29