| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3.8449 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | protected function prePerform() |
||
| 37 | { |
||
| 38 | $original = Base::readJsonOrYaml($this->originalPath, $this->response); |
||
| 39 | $new = Base::readJsonOrYaml($this->newPath, $this->response); |
||
| 40 | 3 | ||
| 41 | 3 | $options = 0; |
|
| 42 | if ($this->rearrangeArrays) { |
||
| 43 | $options += JsonDiff::REARRANGE_ARRAYS; |
||
| 44 | } |
||
| 45 | try { |
||
| 46 | 3 | $this->diff = new JsonDiff($original, $new, $options); |
|
| 47 | 3 | } catch (Exception $e) { |
|
| 48 | 3 | $this->response->error($e->getMessage()); |
|
| 49 | return; |
||
| 50 | } |
||
| 51 | 3 | ||
| 52 | $this->out = ''; |
||
| 53 | } |
||
| 55 | } |