Test Setup Failed
Push — master ( 4706b6...910f0d )
by Josh
04:46
created

Application   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 10
c 0
b 0
f 0
dl 0
loc 38
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getHelp() 0 3 1
A getArt() 0 3 1
A getDefaultInputDefinition() 0 8 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: joshgulledge
5
 * Date: 2/15/18
6
 * Time: 2:43 PM
7
 */
8
9
namespace LCI\Blend;
10
11
use LCI\MODX\Console\Application as ConsoleApplication;
12
use Symfony\Component\Console\Input\InputArgument;
13
use Symfony\Component\Console\Input\InputDefinition;
14
use Symfony\Component\Console\Input\InputOption;
15
16
class Application extends ConsoleApplication
17
{
18
    protected static $logo = 'art/blend.txt';
19
20
    protected static $name = 'Blend Console';
21
22
    protected static $version = '1.0.0 beta4';
23
24
    /**
25
     * @return string
26
     */
27
    public function getHelp()
28
    {
29
        return  parent::getHelp();
30
    }
31
32
    /**
33
     * Gets the default input definition.
34
     *
35
     * @return InputDefinition An InputDefinition instance
36
     */
37
    protected function getDefaultInputDefinition()
38
    {
39
        return new InputDefinition(array(
40
            new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
41
42
            new InputOption('--help',           '-h', InputOption::VALUE_NONE, 'Display this help message.'),
43
            //new InputOption('--verbose',        '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.'),
44
            new InputOption('--version',        '-V', InputOption::VALUE_NONE, 'Display the Blend version.'),
45
        ));
46
    }
47
48
    /**
49
     * @return bool|string
50
     */
51
    protected function getArt()
52
    {
53
        return file_get_contents(__DIR__.'/'.self::$logo);
54
    }
55
}