@@ 54-61 (lines=8) @@ | ||
51 | * |
|
52 | * @return mixed[] |
|
53 | */ |
|
54 | private function parse($data) |
|
55 | { |
|
56 | if ($this->getFormat() === self::FORMAT_JSON) { |
|
57 | return json_decode($data, true); |
|
58 | } |
|
59 | ||
60 | return $this->getXmlParser()->parse($data); |
|
61 | } |
|
62 | ||
63 | /** |
|
64 | * @param mixed[] $data |
@@ 64-71 (lines=8) @@ | ||
61 | * |
|
62 | * @return mixed[] |
|
63 | */ |
|
64 | private function parse($data) |
|
65 | { |
|
66 | if ($this->getFormat() === self::FORMAT_JSON) { |
|
67 | return json_decode($data, true); |
|
68 | } |
|
69 | ||
70 | return $this->getXmlParser()->parse($data, [], true); |
|
71 | } |
|
72 | ||
73 | /** |
|
74 | * @param mixed[] $data |