swaggest/json-cli

View on GitHub
src/Rearrange.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Swaggest\JsonCli;

use Yaoi\Command;

class Rearrange extends BaseDiff
{
    public static function setUpDefinition(Command\Definition $definition, $options)
    {
        parent::setUpDefinition($definition, $options);
        $definition->description = 'Rearrange json document in the order of another (original) json document';
    }


    public function performAction()
    {
        $this->prePerform();
        if (null === $this->diff) {
            return;
        }

        $this->out = $this->diff->getRearranged();

        $this->postPerform();
    }

}