AuditApplication   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 8
c 0
b 0
f 0
dl 0
loc 27
ccs 0
cts 10
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDefaultCommands() 0 10 1
A __construct() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace SetBased\Audit\Application;
5
6
use SetBased\Audit\Command\AlterAuditTableCommand;
7
use SetBased\Audit\Command\AuditCommand;
8
use SetBased\Audit\Command\DiffCommand;
9
use SetBased\Audit\Command\DropTriggersCommand;
10
use Symfony\Component\Console\Application;
11
use Symfony\Component\Console\Command\Command;
12
13
/**
14
 * The Audit program.
15
 */
16
class AuditApplication extends Application
17
{
18
  //--------------------------------------------------------------------------------------------------------------------
19
  /**
20
   * Object constructor.
21
   */
22
  public function __construct()
23
  {
24
    parent::__construct('audit', '1.9.0');
25
  }
26
27
  //--------------------------------------------------------------------------------------------------------------------
28
  /**
29
   * Gets the default commands that should always be available.
30
   *
31
   * @return Command[]
32
   */
33
  protected function getDefaultCommands(): array
34
  {
35
    $commands = parent::getDefaultCommands();
36
37
    $commands[] = new AuditCommand();
38
    $commands[] = new DiffCommand();
39
    $commands[] = new DropTriggersCommand();
40
    $commands[] = new AlterAuditTableCommand();
41
42
    return $commands;
43
  }
44
45
  //--------------------------------------------------------------------------------------------------------------------
46
}
47
48
//----------------------------------------------------------------------------------------------------------------------
49