Completed
Pull Request — master (#20)
by Pavel
02:25
created

SampleCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 26
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 7 1
A execute() 0 4 1
1
<?php
2
3
namespace App\Console\Commands;
4
5
use Symfony\Component\Console\Command\Command;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Output\OutputInterface;
8
9
/**
10
 * SampleCommand
11
 */
12
class SampleCommand extends Command
13
{
14
    /**
15
     * Configuration of command
16
     */
17
    protected function configure()
18
    {
19
        $this
20
            ->setName('sample')
21
            ->setDescription('This is sample console command.')
22
        ;
23
    }
24
25
    /**
26
     * Execute method of command
27
     *
28
     * @param InputInterface $input
29
     * @param OutputInterface $output
30
     *
31
     * @return int|null|void
32
     */
33
    protected function execute(InputInterface $input, OutputInterface $output)
34
    {
35
        $output->writeln(['<info>Execute sample command. Did nothing.</info>']);
36
    }
37
}
38