Rearrange::setUpDefinition()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Swaggest\JsonCli;
4
5
use Yaoi\Command;
6
7
class Rearrange extends BaseDiff
8
{
9 1
    public static function setUpDefinition(Command\Definition $definition, $options)
10
    {
11 1
        parent::setUpDefinition($definition, $options);
12 1
        $definition->description = 'Rearrange json document in the order of another (original) json document';
13 1
    }
14
15
16 1
    public function performAction()
17
    {
18 1
        $this->prePerform();
19 1
        if (null === $this->diff) {
20
            return;
21
        }
22
23 1
        $this->out = $this->diff->getRearranged();
24
25 1
        $this->postPerform();
26 1
    }
27
28
}