ConsoleApplication::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
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\MultiCodingStandard\Console;
11
12
use Symfony\Component\Console\Application;
13
use Symfony\Component\Console\Input\InputArgument;
14
use Symfony\Component\Console\Input\InputDefinition;
15
use Symfony\Component\Console\Input\InputOption;
16
use Symplify\MultiCodingStandard\Console\Command\RunCommand;
17
18
final class ConsoleApplication extends Application
19
{
20
    public function __construct(RunCommand $runCommand)
21
    {
22
        parent::__construct('Symplify Coding Standard', null);
23
        $this->add($runCommand);
24
    }
25
26
    protected function getDefaultInputDefinition() : InputDefinition
27
    {
28
        return new InputDefinition([
29
            new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
30
            new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'),
31
        ]);
32
    }
33
}
34