Completed
Pull Request — master (#10)
by Tomáš
24:14
created

MultiCodingStandardApplication::__construct()   A

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
c 0
b 0
f 0
dl 0
loc 5
ccs 0
cts 4
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
/*
4
 * This file is part of Symplify
5
 * Copyright (c) 2016 Tomas Votruba (http://tomasvotruba.cz).
6
 */
7
8
namespace Symplify\MultiCodingStandard\Console;
9
10
use Symfony\Component\Console\Application;
11
use Symfony\Component\Console\Input\InputArgument;
12
use Symfony\Component\Console\Input\InputDefinition;
13
use Symfony\Component\Console\Input\InputOption;
14
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
15
16
final class MultiCodingStandardApplication extends Application
17
{
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function __construct(EventDispatcherInterface $eventDispatcher)
22
    {
23
        parent::__construct('Symplify Coding Standard', null);
24
        $this->setDispatcher($eventDispatcher);
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    protected function getDefaultInputDefinition() : InputDefinition
31
    {
32
        return new InputDefinition([
33
            new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
34
            new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'),
35
            new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'),
36
        ]);
37
    }
38
}
39