Completed
Push — master ( 5e39f1...9c1d67 )
by Ryan
08:11
created

Application   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 3
dl 0
loc 29
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDefaultInputDefinition() 0 8 1
A getApplicationReferenceOption() 0 6 1
1
<?php namespace Anomaly\Streams\Platform\Console;
2
3
use Symfony\Component\Console\Input\InputOption;
4
5
/**
6
 * Class Application
7
 *
8
 * @link          http://pyrocms.com/
9
 * @author        PyroCMS, Inc. <[email protected]>
10
 * @author        Ryan Thompson <[email protected]>
11
 * @package       Anomaly\Streams\Platform\Console
12
 */
13
class Application extends \Illuminate\Console\Application
14
{
15
16
    /**
17
     * Get the default definition.
18
     *
19
     * @return \Symfony\Component\Console\Input\InputDefinition
20
     */
21
    protected function getDefaultInputDefinition()
22
    {
23
        $definition = parent::getDefaultInputDefinition();
24
25
        $definition->addOption($this->getApplicationReferenceOption());
26
27
        return $definition;
28
    }
29
30
    /**
31
     * Get the global environment option for the definition.
32
     *
33
     * @return \Symfony\Component\Console\Input\InputOption
34
     */
35
    protected function getApplicationReferenceOption()
36
    {
37
        $message = 'The application the command should run under.';
38
39
        return new InputOption('--app', null, InputOption::VALUE_OPTIONAL, $message);
40
    }
41
}
42