| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 57 | public function getResult($key = null) |
||
| 58 | { |
||
| 59 | if ($this->isSuccess()) { |
||
| 60 | if (null === $key) { |
||
| 61 | return $this->_result; |
||
| 62 | } else { |
||
| 63 | return I::get($this->_result, $key); |
||
| 64 | } |
||
| 65 | } |
||
| 66 | $error = $this->getError(); |
||
| 67 | if(is_array($error)){ |
||
|
|
|||
| 68 | return $error; |
||
| 69 | } |
||
| 70 | throw new Exception((string) $error); |
||
| 71 | } |
||
| 122 |