Conditions | 3 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function evaluate(Json $json, $expression) |
||
27 | { |
||
28 | if ($this->evaluationMode === 'javascript') { |
||
29 | $expression = str_replace('->', '.', $expression); |
||
30 | } |
||
31 | |||
32 | try { |
||
33 | return $json->read($expression, $this->propertyAccessor); |
||
34 | } catch (\Exception $e) { |
||
35 | throw new \Exception(sprintf('Failed to evaluate expression "%s"', $expression), 0, $e); |
||
36 | } |
||
37 | } |
||
38 | |||
44 |