Total Complexity | 5 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
20 | class DefaultDeserializationExclusionData implements DeserializationExclusionData |
||
21 | { |
||
22 | /** |
||
23 | * @var object |
||
24 | */ |
||
25 | private $objectToReadInto; |
||
26 | |||
27 | /** |
||
28 | * @var JsonReadable |
||
29 | */ |
||
30 | private $reader; |
||
31 | |||
32 | /** |
||
33 | * Constructor |
||
34 | * |
||
35 | * @param object $objectToReadInto |
||
36 | * @param JsonReadable $reader |
||
37 | */ |
||
38 | 2 | public function __construct($objectToReadInto, JsonReadable $reader) |
|
39 | { |
||
40 | 2 | $this->objectToReadInto = $objectToReadInto; |
|
41 | 2 | $this->reader = $reader; |
|
42 | 2 | } |
|
43 | |||
44 | /** |
||
45 | * Get the json data after json_decode() |
||
46 | * |
||
47 | * @return mixed |
||
48 | */ |
||
49 | 1 | public function getPayload() |
|
52 | } |
||
53 | |||
54 | /** |
||
55 | * Returns the initial object if it was provided to Gson::fromJson() or null |
||
56 | * |
||
57 | * @return object|null |
||
58 | */ |
||
59 | 1 | public function getObjectToReadInto() |
|
62 | } |
||
63 | |||
64 | /** |
||
65 | * Get the reader context |
||
66 | * |
||
67 | * @return ReaderContext |
||
68 | */ |
||
69 | 1 | public function getContext(): ReaderContext |
|
72 | } |
||
73 | |||
74 | /** |
||
75 | * Get the current path formatted as json xpath |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | 2 | public function getPath(): string |
|
84 |