HelloCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Feature\Framework\DocBlockServiceAware\Module\Infrastructure\Command;
6
7
use Gacela\Framework\DocBlockResolverAwareTrait;
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 DocBlockResolverAwareTrait;
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