| Total Complexity | 3 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 22 | class PromiseTemplateListResponder implements ApiResponderInterface, WorkerInterface |
||
| 23 | { |
||
| 24 | use Responder; |
||
|
|
|||
| 25 | |||
| 26 | private $count; |
||
| 27 | |||
| 28 | private $templates = []; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @inheritDoc |
||
| 32 | */ |
||
| 33 | public function process(ContractResponseInterface $response): ApiResponderInterface |
||
| 34 | { |
||
| 35 | $content = json_decode($response->getContent())->aliexpress_postproduct_redefining_querypromisetemplatebyid_response->result; |
||
| 36 | isset($content->error_code) ? $this->error($content) : $this->success($content); |
||
| 37 | return $this; |
||
| 38 | } |
||
| 39 | |||
| 40 | // {"aliexpress_postproduct_redefining_querypromisetemplatebyid_response":{"result":{"template_list":{"templatelist":[{"id":0,"name":"Service Template for New Sellers"}]}},"request_id":"6q1kgx1ihhw7"}} |
||
| 41 | protected function success(\stdClass $response) |
||
| 50 | ; |
||
| 51 | } |
||
| 53 |