Completed
Push — master ( 5bd517...c7b86e )
by Tomáš
08:52
created

ConsoleApplication   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getDefaultInputDefinition() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of Symplify
7
 * Copyright (c) 2016 Tomas Votruba (http://tomasvotruba.cz).
8
 */
9
10
namespace Symplify\PHP7_Sculpin\Console;
11
12
use Symfony\Component\Console\Application as BaseApplication;
13
use Symfony\Component\Console\Input\InputArgument;
14
use Symfony\Component\Console\Input\InputDefinition;
15
use Symfony\Component\Console\Input\InputOption;
16
17
final class ConsoleApplication extends BaseApplication
18
{
19
    public function __construct()
20
    {
21
        parent::__construct('Sculpin - Static Site Generator');
22
    }
23
24
    protected function getDefaultInputDefinition() : InputDefinition
25
    {
26
        return new InputDefinition(array(
27
            new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
28
            new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'),
29
        ));
30
    }
31
}
32