Application   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 45
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getHelp() 0 4 1
A getDefaultCommands() 0 8 1
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