Total Complexity | 6 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 56% |
Changes | 0 |
1 | <?php |
||
9 | class ValidateSchema extends Base |
||
10 | { |
||
11 | public $schema; |
||
12 | public $data; |
||
13 | |||
14 | /** |
||
15 | * @param Command\Definition $definition |
||
16 | * @param \stdClass|static $options |
||
17 | */ |
||
18 | 1 | static function setUpDefinition(Command\Definition $definition, $options) |
|
19 | { |
||
20 | 1 | $options->data = Command\Option::create()->setIsUnnamed()->setIsRequired() |
|
21 | 1 | ->setDescription('Path to data (JSON/YAML)'); |
|
22 | 1 | $options->schema = Command\Option::create()->setIsUnnamed() |
|
23 | 1 | ->setDescription('Path to schema, default JSON Schema'); |
|
24 | 1 | } |
|
25 | |||
26 | |||
27 | 1 | public function performAction() |
|
54 | } |
||
55 | } |
||
56 | } |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.