HelloWorld   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 26
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 6 1
A execute() 0 11 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: harry
5
 * Date: 2/12/18
6
 * Time: 4:11 PM
7
 */
8
9
namespace PhpBootstrap\Console;
10
11
use Symfony\Component\Console\Command\Command;
12
use Symfony\Component\Console\Input\InputInterface;
13
use Symfony\Component\Console\Output\OutputInterface;
14
15
class HelloWorld extends Command
16
{
17
    protected function configure()
18
    {
19
        $this->setName('app:helloworld')
20
            ->setDescription('testing redis by set new key `hello-world`.')
21
            ->setHelp('This command only for testing...');
22
    }
23
24
    /**
25
     * @param InputInterface $input
26
     * @param OutputInterface $output
27
     * @return int|null|void
28
     */
29
    protected function execute(InputInterface $input, OutputInterface $output)
30
    {
31
        // outputs multiple lines to the console (adding "\n" at the end of each line)
32
        $output->writeln([
33
            'Trying `to greet` the world',
34
            '============',
35
        ]);
36
37
        // outputs a message followed by a "\n"
38
        $output->writeln('Great the world `accept you`');
39
    }
40
}