Completed
Pull Request — master (#20)
by Pavel
10:22
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\InputArgument;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Input\InputOption;
9
use Symfony\Component\Console\Output\OutputInterface;
10
11
/**
12
 * SampleCommand
13
 */
14
class SampleCommand extends Command
15
{
16
    /**
17
     * Configuration of command
18
     */
19
    protected function configure()
20
    {
21
        $this
22
            ->setName('sample')
23
            ->setDescription('This is sample console command.')
24
        ;
25
    }
26
27
    /**
28
     * Execute method of command
29
     *
30
     * @param InputInterface $input
31
     * @param OutputInterface $output
32
     *
33
     * @return int|null|void
34
     */
35
    protected function execute(InputInterface $input, OutputInterface $output)
36
    {
37
        $output->writeln(['<info>Execute sample command. Did nothing.</info>']);
38
    }
39
}
40