ConsoleApplication::getDefaultInputDefinition()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 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 4
    public function __construct()
20
    {
21 4
        parent::__construct('Sculpin - Static Site Generator');
22 4
    }
23
24 4
    protected function getDefaultInputDefinition() : InputDefinition
25
    {
26 4
        return new InputDefinition([
27 4
            new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
28 4
            new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'),
29
        ]);
30
    }
31
}
32