Application::getHelp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PCextreme\Cloudstack\Console;
6
7
use Symfony\Component\Console\Application as BaseApplication;
8
9
class Application extends BaseApplication
10
{
11
    /**
12
     * @var string
13
     */
14
    private static $logo = "   ___  ___          _
15
  / _ \/ __\_____  _| |_ _ __ ___ _ __ ___   ___
16
 / /_)/ /  / _ \ \/ / __| '__/ _ \ '_ ` _ \ / _ \
17
/ ___/ /__|  __/>  <| |_| | |  __/ | | | | |  __/
18
\/   \____/\___/_/\_\\\__|_|  \___|_| |_| |_|\___|
19
20
";
21
22
    /**
23
     * Create a new instance of the application.
24
     */
25
    public function __construct()
26
    {
27
        parent::__construct('PCextreme Cloudstack client');
28
    }
29
30
    /**
31
     * Gets the help message.
32
     *
33
     * @return string A help message
34
     */
35
    public function getHelp() : string
36
    {
37
        return self::$logo . parent::getHelp();
38
    }
39
40
    /**
41
     * Gets the default commands that should always be available.
42
     *
43
     * @return array
44
     */
45
    protected function getDefaultCommands() : array
46
    {
47
        $commands = array_merge(parent::getDefaultCommands(), [
48
            new ApiListCommand(),
49
        ]);
50
51
        return $commands;
52
    }
53
}
54