@@ -19,8 +19,8 @@ |
||
| 19 | 19 | protected function configure() |
| 20 | 20 | { |
| 21 | 21 | $this->setName('about') |
| 22 | - ->setDescription('Short information about AuditApplication') |
|
| 23 | - ->setHelp('<info>audit about</info>'); |
|
| 22 | + ->setDescription('Short information about AuditApplication') |
|
| 23 | + ->setHelp('<info>audit about</info>'); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | //-------------------------------------------------------------------------------------------------------------------- |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | $this->io->write(<<<EOT |
| 35 | 35 | <info>AuditApplication - Database Auditing</info> |
| 36 | 36 | <comment>Creates audit tables and triggers to track data changes in databases.</comment> |
| 37 | -EOT |
|
| 37 | +eot |
|
| 38 | 38 | ); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -70,8 +70,8 @@ |
||
| 70 | 70 | if ($mandatory) |
| 71 | 71 | { |
| 72 | 72 | throw new RuntimeException("Setting '%s' not found in section '%s' configuration file.", |
| 73 | - $settingName, |
|
| 74 | - $sectionName); |
|
| 73 | + $settingName, |
|
| 74 | + $sectionName); |
|
| 75 | 75 | } |
| 76 | 76 | else |
| 77 | 77 | { |
@@ -28,8 +28,8 @@ |
||
| 28 | 28 | protected function configure() |
| 29 | 29 | { |
| 30 | 30 | $this->setName('config') |
| 31 | - ->setDescription('Create or edit config file') |
|
| 32 | - ->addArgument('config file', InputArgument::OPTIONAL, 'The audit configuration file', 'etc/audit.json'); |
|
| 31 | + ->setDescription('Create or edit config file') |
|
| 32 | + ->addArgument('config file', InputArgument::OPTIONAL, 'The audit configuration file', 'etc/audit.json'); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | //-------------------------------------------------------------------------------------------------------------------- |
@@ -21,10 +21,10 @@ discard block |
||
| 21 | 21 | protected function configure() |
| 22 | 22 | { |
| 23 | 23 | $this->setName('drop-triggers') |
| 24 | - ->setDescription('Drops all triggers') |
|
| 25 | - ->setHelp('Drops all triggers (including triggers not created by audit) from all tables (including tables '. |
|
| 26 | - 'excluded for auditing) in the data schema.') |
|
| 27 | - ->addArgument('config file', InputArgument::REQUIRED, 'The audit configuration file'); |
|
| 24 | + ->setDescription('Drops all triggers') |
|
| 25 | + ->setHelp('Drops all triggers (including triggers not created by audit) from all tables (including tables '. |
|
| 26 | + 'excluded for auditing) in the data schema.') |
|
| 27 | + ->addArgument('config file', InputArgument::REQUIRED, 'The audit configuration file'); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | //-------------------------------------------------------------------------------------------------------------------- |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | foreach ($triggers as $trigger) |
| 61 | 61 | { |
| 62 | 62 | $this->io->logInfo('Dropping trigger <dbo>%s</dbo> from table <dbo>%s</dbo>', |
| 63 | - $trigger['trigger_name'], |
|
| 64 | - $trigger['table_name']); |
|
| 63 | + $trigger['trigger_name'], |
|
| 64 | + $trigger['table_name']); |
|
| 65 | 65 | |
| 66 | 66 | AuditDataLayer::dropTrigger($data_schema, $trigger['trigger_name']); |
| 67 | 67 | } |
@@ -197,8 +197,7 @@ |
||
| 197 | 197 | && $audit_character_set_name==$config_character_set_name |
| 198 | 198 | && $audit_collation_name==$config_collation_name |
| 199 | 199 | && $audit_collation_name==$data_collation_name |
| 200 | - ) |
|
| 201 | - { |
|
| 200 | + ) { |
|
| 202 | 201 | return true; |
| 203 | 202 | } |
| 204 | 203 | } |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | No SQL statements will be generated for missing or obsolete columns in the |
| 50 | 50 | audit tables. Use the command 'audit' for creating missing columns in audit |
| 51 | 51 | tables. |
| 52 | -EOL |
|
| 52 | +eol |
|
| 53 | 53 | ); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -31,9 +31,9 @@ |
||
| 31 | 31 | protected function configure() |
| 32 | 32 | { |
| 33 | 33 | $this->setName('alter-audit-table') |
| 34 | - ->setDescription('Creates alter SQL statements for audit tables') |
|
| 35 | - ->addArgument('config file', InputArgument::REQUIRED, 'The audit configuration file') |
|
| 36 | - ->addArgument('sql file', InputArgument::OPTIONAL, 'The destination file for the SQL statements'); |
|
| 34 | + ->setDescription('Creates alter SQL statements for audit tables') |
|
| 35 | + ->addArgument('config file', InputArgument::REQUIRED, 'The audit configuration file') |
|
| 36 | + ->addArgument('sql file', InputArgument::OPTIONAL, 'The destination file for the SQL statements'); |
|
| 37 | 37 | |
| 38 | 38 | $this->setHelp(<<<EOL |
| 39 | 39 | Generates alter table SQL statements for aligning the audit tables with the |
@@ -32,9 +32,9 @@ |
||
| 32 | 32 | protected function configure() |
| 33 | 33 | { |
| 34 | 34 | $this->setName('diff') |
| 35 | - ->setDescription('Compares data tables and audit tables') |
|
| 36 | - ->addArgument('config file', InputArgument::REQUIRED, 'The audit configuration file') |
|
| 37 | - ->addOption('full', 'f', InputOption::VALUE_NONE, 'Show all columns'); |
|
| 35 | + ->setDescription('Compares data tables and audit tables') |
|
| 36 | + ->addArgument('config file', InputArgument::REQUIRED, 'The audit configuration file') |
|
| 37 | + ->addOption('full', 'f', InputOption::VALUE_NONE, 'Show all columns'); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | //-------------------------------------------------------------------------------------------------------------------- |
@@ -22,12 +22,12 @@ |
||
| 22 | 22 | protected function configure() |
| 23 | 23 | { |
| 24 | 24 | $this->setName('audit') |
| 25 | - ->setDescription('Maintains audit tables and audit triggers') |
|
| 26 | - ->setHelp("Maintains audit tables and audit triggers:\n". |
|
| 27 | - "- creates new audit tables\n". |
|
| 28 | - "- adds new columns to exiting audit tables\n". |
|
| 29 | - "- creates new and recreates existing audit triggers\n") |
|
| 30 | - ->addArgument('config file', InputArgument::REQUIRED, 'The audit configuration file'); |
|
| 25 | + ->setDescription('Maintains audit tables and audit triggers') |
|
| 26 | + ->setHelp("Maintains audit tables and audit triggers:\n". |
|
| 27 | + "- creates new audit tables\n". |
|
| 28 | + "- adds new columns to exiting audit tables\n". |
|
| 29 | + "- creates new and recreates existing audit triggers\n") |
|
| 30 | + ->addArgument('config file', InputArgument::REQUIRED, 'The audit configuration file'); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | //-------------------------------------------------------------------------------------------------------------------- |
@@ -201,7 +201,7 @@ |
||
| 201 | 201 | { |
| 202 | 202 | $name = $option; |
| 203 | 203 | } |
| 204 | - $tableRow = ['column_name' => $name, |
|
| 204 | + $tableRow = ['column_name' => $name, |
|
| 205 | 205 | 'data' => $this->dataTableOptions[$option], |
| 206 | 206 | 'audit' => $this->auditTableOptions[$option], |
| 207 | 207 | 'config' => null]; |