Completed
Push — master ( 23bc19...2eec4d )
by Tomáš
11:42
created

Php7CodeSnifferApplication   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 4
dl 0
loc 22
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getDefaultInputDefinition() 0 7 1
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\PHP7_CodeSniffer\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 Php7CodeSnifferApplication extends Application
17
{
18
    /**
19
     * {@inheritdoc}
20
     */
21 1
    public function __construct(EventDispatcherInterface $eventDispatcher)
22
    {
23 1
        parent::__construct('PHP 7 Code Sniffer', null);
24 1
        $this->setDispatcher($eventDispatcher);
25 1
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30 1
    protected function getDefaultInputDefinition() : InputDefinition
31
    {
32 1
        return new InputDefinition([
33 1
            new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
34 1
            new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message')
35
        ]);
36
    }
37
}
38