| Conditions | 6 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 6 | public function wrapUp() |
|
| 34 | { |
||
| 35 | 6 | if ($this->okay && $this->forApi) { |
|
| 36 | 3 | return $this->parsePaystackResponse(); |
|
| 37 | } |
||
| 38 | 3 | if (!$this->okay && $this->forApi) { |
|
| 39 | 1 | throw new \Exception($this->implodedMessages()); |
|
| 40 | } |
||
| 41 | 2 | if ($this->okay) { |
|
| 42 | 1 | return $this->body; |
|
| 43 | } |
||
| 44 | 1 | error_log($this->implodedMessages()); |
|
| 45 | 1 | return false; |
|
| 46 | } |
||
| 47 | } |
||
| 48 |