| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function build(array $apiData, string $dto): IResponseInterface |
||
| 18 | { |
||
| 19 | if ($apiData['retCode'] == 0) { |
||
| 20 | return new SuccessResponse( |
||
| 21 | $dto, |
||
| 22 | $apiData['retCode'], |
||
| 23 | $apiData['retMsg'], |
||
| 24 | $apiData['retExtInfo'], |
||
| 25 | $apiData['result'], |
||
| 26 | $apiData['result']['nextPageCursor'] ?? '' |
||
| 27 | ); |
||
| 28 | } else { |
||
| 29 | return new ExceptionResponse([ |
||
| 30 | 'success' => false, |
||
| 31 | 'ret_msg' => $apiData['retMsg'], |
||
| 32 | ]); |
||
| 36 |