HelloWorld::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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
}