Hello   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 6
c 3
b 0
f 0
dl 0
loc 22
ccs 5
cts 5
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A execute() 0 5 1
A getDefaultDescription() 0 3 1
A getDefaultName() 0 3 1
A __construct() 0 3 1
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