| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 1 | static function setUpDefinition(Definition $definition, $options) |
|
| 22 | { |
||
| 23 | 1 | $options->patchPath = Command\Option::create()->setType()->setIsUnnamed() |
|
| 24 | 1 | ->setDescription('Path to JSON patch file'); |
|
| 25 | 1 | $options->basePath = Command\Option::create()->setType()->setIsUnnamed() |
|
| 26 | 1 | ->setDescription('Path to JSON base file'); |
|
| 27 | |||
| 28 | 1 | parent::setUpDefinition($definition, $options); |
|
| 29 | |||
| 30 | 1 | $definition->description = 'Apply patch to base json document, output to STDOUT'; |
|
| 31 | 1 | $options->tolerateErrors = Command\Option::create() |
|
| 32 | 1 | ->setDescription('Continue on error'); |
|
| 33 | 1 | } |
|
| 55 | } |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.