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

Application::getDefaultInputDefinition()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 8
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
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