| Conditions | 2 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 25 | protected function execute(Input $input, Output $output) |
||
| 26 | { |
||
| 27 | $output->writeln('<info>Processing...</info>'); |
||
| 28 | |||
| 29 | $revisionTitle = trim($input->getArgument('revisionTitle')); |
||
|
|
|||
| 30 | $tableName = trim($input->getArgument('tableName')); |
||
| 31 | $originalId = trim($input->getArgument('originalId')); |
||
| 32 | |||
| 33 | try { |
||
| 34 | $revisionId = (new RevisionAPI())->saveAPI($revisionTitle, $tableName, (int)$originalId); |
||
| 35 | $output->writeln('<comment>Revision ID: ' . $revisionId . '</comment>'); |
||
| 36 | $output->writeln('<info>...Complete successfully.</info>'); |
||
| 37 | } catch (Exception $e) { |
||
| 38 | $output->writeln('<error>Error: ' . $e->getMessage() . '</error>'); |
||
| 39 | } |
||
| 42 |