Hello::getDefaultDescription()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Command;
6
7
use Symfony\Component\Console\Command\Command;
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Output\OutputInterface;
10
use Yiisoft\Yii\Console\ExitCode;
11
12
final class Hello extends Command
13
{
14
    public function __construct()
15
    {
16
        parent::__construct();
17 1
    }
18
19 1
    public static function getDefaultName(): string
20
    {
21
        return 'hello';
22 1
    }
23
24 1
    public static function getDefaultDescription(): string
25 1
    {
26
        return 'An example command';
27
    }
28
29
    protected function execute(InputInterface $input, OutputInterface $output): int
30
    {
31
        $output->writeln('Hello!');
32
33
        return ExitCode::OK;
34
    }
35
}
36