Completed
Push — symfony-console ( c96862...f4655c )
by Arnaud
02:14
created

Application::getDefaultInputDefinition()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/*
3
 * Copyright (c) Arnaud Ligny <[email protected]>
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace Cecil;
10
11
use Symfony\Component\Console\Application as BaseApplication;
12
13
/**
14
 * The console application that handles the commands.
15
 */
16
class Application extends BaseApplication
17
{
18
    private static $banner = '  ____          _ _
19
 / ___|___  ___(_) | Your content driven
20
| |   / _ \/ __| | | static site generator.
21
| |__|  __/ (__| | |
22
 \____\___|\___|_|_| by Arnaud Ligny
23
';
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function getHelp()
29
    {
30
        return self::$banner.parent::getHelp();
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    protected function getDefaultCommands()
37
    {
38
        $commands = array_merge(parent::getDefaultCommands(), [
39
            new Command\CommandBuild(),
40
            new Command\CommandClean(),
41
        ]);
42
        if (Util\Plateform::isPhar()) {
43
            $commands[] = new Command\CommandSelfUpdate();
44
        }
45
46
        return $commands;
47
    }
48
}
49