Rearrange   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 90%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 19
ccs 9
cts 10
cp 0.9
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUpDefinition() 0 4 1
A performAction() 0 10 2
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
}