| Conditions | 1 |
| Paths | 1 |
| Total Lines | 36 |
| Code Lines | 61 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | static function init() |
||
|
|
|||
| 40 | { |
||
| 41 | self::$simpleOriginal = (object)(array("root" => (object)array("a" => 1, "b" => 2))); |
||
| 42 | self::$simpleNew = (object)(array("root" => (object)array("b" => 3, "c" => 4))); |
||
| 43 | self::$original = json_decode(<<<'JSON' |
||
| 44 | { |
||
| 45 | "key1": [ |
||
| 46 | 4, |
||
| 47 | 1, |
||
| 48 | 2, |
||
| 49 | 3 |
||
| 50 | ], |
||
| 51 | "key2": 2, |
||
| 52 | "key3": { |
||
| 53 | "sub0": 0, |
||
| 54 | "sub1": "a", |
||
| 55 | "sub2": "b" |
||
| 56 | }, |
||
| 57 | "key4": [ |
||
| 58 | { |
||
| 59 | "a": 1, |
||
| 60 | "b": true |
||
| 61 | }, |
||
| 62 | { |
||
| 63 | "a": 2, |
||
| 64 | "b": false |
||
| 65 | }, |
||
| 66 | { |
||
| 67 | "a": 3 |
||
| 68 | } |
||
| 69 | ] |
||
| 70 | } |
||
| 71 | JSON |
||
| 72 | ); |
||
| 73 | |||
| 74 | self::$new = json_decode(<<<'JSON' |
||
| 75 | { |
||
| 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.