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