Conditions | 3 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
49 | public function getDataFrom(string $document): array |
||
50 | { |
||
51 | $baseTree = json_decode($document, true); |
||
52 | |||
53 | if (is_null($baseTree)) { |
||
54 | return []; |
||
55 | } |
||
56 | |||
57 | try { |
||
58 | $extractor = new $this->extractor($baseTree, $this->output); |
||
59 | |||
60 | return $extractor->extract(); |
||
61 | } catch (UnparseableApiException $e) { |
||
62 | return []; |
||
63 | } |
||
66 |