Failed Conditions
Push — master ( 6fca32...0b1cfb )
by Michał
02:10
created

NoteList::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
namespace BarenoteCli\Command\Note;
3
4
5
use Symfony\Component\Console\Command\Command;
6
use Symfony\Component\Console\Helper\Table;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
class NoteList extends Command
11
{
12
    protected function configure()
13
    {
14
        $this
15
            ->setName('barenote:note:list')
16
            ->setDescription('List of your recent notes')
17
            ->setHelp('Some basic menu help');
18
    }
19
    
20
    protected function execute(InputInterface $input, OutputInterface $output)
21
    {
22
        $table = new Table($output);
23
        $table
24
            ->setHeaders(['ISBN', 'Title', 'Author'])
25
            ->setRows([
26
                ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'],
27
                ['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'],
28
                ['960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'],
29
                ['80-902734-1-6', 'And Then There Were None', 'Agatha Christie'],
30
            ]);
31
        $table->render();
32
    }
33
}