AuditApplication::getDefaultCommands()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 6
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 10
ccs 0
cts 7
cp 0
crap 2
rs 10
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