HelloCommand::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Command;
6
7
use Symfony\Component\Console\Attribute\AsCommand;
8
use Symfony\Component\Console\Command\Command;
9
use Symfony\Component\Console\Input\InputInterface;
10
use Symfony\Component\Console\Output\OutputInterface;
11
use Yiisoft\Yii\Console\ExitCode;
12
13
#[AsCommand(name: 'hello', description: 'An example command', hidden: false)]
14
final class HelloCommand extends Command
15
{
16
    protected function execute(InputInterface $input, OutputInterface $output): int
17
    {
18
        $output->writeln('Hello!');
19
        return ExitCode::OK;
20
    }
21
}
22