Total Complexity | 5 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | class CategoryTreeResponder implements ApiResponderInterface, WorkerInterface |
||
23 | { |
||
24 | use Responder; |
||
|
|||
25 | |||
26 | private $count; |
||
27 | |||
28 | private $categories = []; |
||
29 | |||
30 | /** |
||
31 | * @inheritDoc |
||
32 | */ |
||
33 | public function process(ContractResponseInterface $response): ApiResponderInterface |
||
34 | { |
||
35 | $content = json_decode($response->getContent()); |
||
36 | isset($content->error_response) ? $this->error($content->error_response) : $this->success($content->aliexpress_solution_seller_category_tree_query_response); |
||
37 | return $this; |
||
38 | } |
||
39 | |||
40 | protected function success(\stdClass $response) |
||
56 | } |
||
57 | } |
||
58 |