| Total Complexity | 8 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class Bulk extends Response |
||
| 10 | { |
||
| 11 | |||
| 12 | /* |
||
| 13 | * Check whenever response has error |
||
| 14 | * @return bool |
||
| 15 | */ |
||
| 16 | public function hasError() |
||
| 17 | { |
||
| 18 | $response = $this->getResponse(); |
||
| 19 | foreach ($response as $r) { |
||
| 20 | if (isset($r['error']) && $r['error'] !== '') { |
||
| 21 | return true; |
||
| 22 | } |
||
| 23 | } |
||
| 24 | return false; |
||
| 25 | } |
||
| 26 | |||
| 27 | /* |
||
| 28 | * Return error |
||
| 29 | * @return false|string |
||
| 30 | */ |
||
| 31 | public function getError() |
||
| 41 | } |
||
| 42 | } |