Passed
Push — master ( 7ad944...9954d6 )
by Viacheslav
02:21
created

App::setUpCommands()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 7
nc 1
nop 2
1
<?php
2
3
namespace Swaggest\JsonDiff\Cli;
4
5
use Yaoi\Command;
6
use Yaoi\Command\Definition;
7
8
class App extends Command\Application
9
{
10
    public $diff;
11
    public $apply;
12
    public $rearrange;
13
    public $info;
14
15
    /**
16
     * @param Definition $definition
17
     * @param \stdClass|static $commandDefinitions
18
     */
19
    static function setUpCommands(Definition $definition, $commandDefinitions)
20
    {
21
        $definition->name = 'json-diff';
22
        $definition->version = 'v2.0.0';
23
        $definition->description = 'JSON diff and apply tool for PHP, https://github.com/swaggest/json-diff';
24
25
        $commandDefinitions->diff = Diff::definition();
26
        $commandDefinitions->apply = Apply::definition();
27
        $commandDefinitions->rearrange = Rearrange::definition();
28
        $commandDefinitions->info = Info::definition();
29
    }
30
}