Completed
Push — master ( 073cc1...713384 )
by Gareth
13:53
created

TldrCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 12
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
namespace GarethEllis\Tldr\Console\Command;
3
4
use Symfony\Component\Console\Command\Command;
5
use Symfony\Component\Console\Input\InputArgument;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Input\InputOption;
8
use Symfony\Component\Console\Output\OutputInterface;
9
use GarethEllis\Tldr\Client;
10
use GuzzleHttp\Client as Http;
11
12
class TldrCommand extends Command
13
{
14
    protected function configure()
15
    {
16
        $this
17
            ->setName('tldr')
18
            ->setDescription('Perform a look-up against the TLDR man pages project')
19
            ->addArgument(
20
                'page',
21
                InputArgument::REQUIRED,
22
                'Please specify a man page to look-up.'
23
            )
24
        ;
25
    }
26
27
    protected function execute(InputInterface $input, OutputInterface $output)
28
    {
29
        $http = new Http();
30
        $client = new Client($http);
31
32
        $client->lookupPage($input->getArgument("page"));
33
    }
34
}