| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public static function getResult(OperationCommand $command, $resultPath = []) |
||
| 30 | { |
||
| 31 | $result = new Collection($command->getResponse()->json()); |
||
| 32 | if ($result['status'] !== 'success') { |
||
| 33 | throw new Exception("Unsuccessful response from ScaleEngine: {$result['code']}: {$result['message']}"); |
||
| 34 | } |
||
| 35 | |||
| 36 | return $result->getPath($resultPath); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |