| Total Complexity | 6 |
| Total Lines | 70 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class DiffBench |
||
| 6 | { |
||
| 7 | static $simpleOriginal; |
||
| 8 | static $simpleNew; |
||
| 9 | |||
| 10 | static $original; |
||
| 11 | static $new; |
||
| 12 | |||
| 13 | public function benchSimpleSkipPatch() |
||
| 14 | { |
||
| 15 | new JsonDiff(self::$simpleOriginal, self::$simpleNew, JsonDiff::REARRANGE_ARRAYS); |
||
| 16 | } |
||
| 17 | |||
| 18 | public function benchSimpleRearrange() |
||
| 21 | } |
||
| 22 | |||
| 23 | public function benchSkipPatch() |
||
| 24 | { |
||
| 25 | new JsonDiff(self::$original, self::$new, JsonDiff::REARRANGE_ARRAYS); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function benchRearrange() |
||
| 29 | { |
||
| 30 | new JsonDiff(self::$original, self::$new, JsonDiff::REARRANGE_ARRAYS); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function benchStopOnDiff() |
||
| 34 | { |
||
| 35 | new JsonDiff(self::$original, self::$new, JsonDiff::STOP_ON_DIFF); |
||
| 36 | } |
||
| 37 | |||
| 38 | |||
| 39 | static function init() |
||
| 75 | { |
||
| 76 | "key5": "wat", |
||
| 77 | "key1": [ |
||
| 78 | 5, |
||
| 79 | 1, |
||
| 109 | DiffBench::init(); |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.