@@ -15,7 +15,7 @@ |
||
15 | 15 | $list = new EntityCollection(); |
16 | 16 | |
17 | 17 | if (!empty($data['list'])) { |
18 | - array_map(function ($item) use ($list) { |
|
18 | + array_map(function($item) use ($list) { |
|
19 | 19 | $list->push(ResponseDtoBuilder::make(OrderHistoryResponseItem::class, $item)); |
20 | 20 | }, $data['list']); |
21 | 21 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | public function __construct(array $data) |
13 | 13 | { |
14 | - $this->success = (bool) $data['success']; |
|
14 | + $this->success = (bool)$data['success']; |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | /** |
@@ -15,7 +15,7 @@ |
||
15 | 15 | $list = new EntityCollection(); |
16 | 16 | |
17 | 17 | if (!empty($data['list'])) { |
18 | - array_map(function ($item) use ($list) { |
|
18 | + array_map(function($item) use ($list) { |
|
19 | 19 | $list->push(ResponseDtoBuilder::make(TradeHistoryResponseItem::class, $item)); |
20 | 20 | }, $data['list']); |
21 | 21 | } |
@@ -130,7 +130,7 @@ |
||
130 | 130 | $idsList[] = $orderInfo->getOrderId(); |
131 | 131 | } |
132 | 132 | |
133 | - $fakeId = rand(0,100); |
|
133 | + $fakeId = rand(0, 100); |
|
134 | 134 | $idsList[] = $fakeId; |
135 | 135 | |
136 | 136 | $params = (new BatchCancelOrderByIdRequest())->setOrderIds(implode(',', $idsList)); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $list = new EntityCollection(); |
22 | 22 | |
23 | 23 | if (!empty($data['list'])) { |
24 | - array_map(function ($item) use ($list) { |
|
24 | + array_map(function($item) use ($list) { |
|
25 | 25 | $list->push(ResponseDtoBuilder::make(BatchCancelOrderByIdResponseItem::class, $item)); |
26 | 26 | }, $data['list']); |
27 | 27 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | $list = new EntityCollection(); |
16 | 16 | |
17 | 17 | if (!empty($data['list'])) { |
18 | - array_map(function ($item) use ($list) { |
|
18 | + array_map(function($item) use ($list) { |
|
19 | 19 | $list->push(ResponseDtoBuilder::make(OpenOrdersResponseItem::class, $item)); |
20 | 20 | }, $data['list']); |
21 | 21 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function testBuildResponseData() |
16 | 16 | { |
17 | - $json = '{"retCode":0,"retMsg":"OK","result":{"id":"2087","ltCode":"DOT3LUSDT","orderAmount":"","orderQuantity":"50","orderStatus":"2","quantity":"","serialNo":"r001","timestamp":1662605726326,"valueCoin":"DOT3L"},"retExtInfo":{},"time":1662605727987}';; |
|
17 | + $json = '{"retCode":0,"retMsg":"OK","result":{"id":"2087","ltCode":"DOT3LUSDT","orderAmount":"","orderQuantity":"50","orderStatus":"2","quantity":"","serialNo":"r001","timestamp":1662605726326,"valueCoin":"DOT3L"},"retExtInfo":{},"time":1662605727987}'; ; |
|
18 | 18 | $data = (new CurlResponseHandler())->build(json_decode($json, true), ReedemResponse::class); |
19 | 19 | |
20 | 20 | $this->assertEquals(0, $data->getReturnCode()); |
@@ -76,16 +76,16 @@ |
||
76 | 76 | |
77 | 77 | public function __construct(array $data) |
78 | 78 | { |
79 | - $this->amount = (float) $data['amount']; |
|
80 | - $this->execTime = DateTimeHelper::makeFromTimestamp((int) $data['excTime']); |
|
81 | - $this->fee = (float) $data['fee']; |
|
79 | + $this->amount = (float)$data['amount']; |
|
80 | + $this->execTime = DateTimeHelper::makeFromTimestamp((int)$data['excTime']); |
|
81 | + $this->fee = (float)$data['fee']; |
|
82 | 82 | $this->ltCode = $data['ltCode']; |
83 | 83 | $this->orderId = $data['orderId']; |
84 | 84 | $this->orderStatus = $data['orderStatus']; |
85 | - $this->orderTime = DateTimeHelper::makeFromTimestamp((int) $data['orderTime']); |
|
85 | + $this->orderTime = DateTimeHelper::makeFromTimestamp((int)$data['orderTime']); |
|
86 | 86 | $this->orderType = $data['orderType']; |
87 | 87 | $this->serialNo = $data['serialNo']; |
88 | - $this->value = (float) $data['value']; |
|
88 | + $this->value = (float)$data['value']; |
|
89 | 89 | $this->valueCoin = $data['valueCoin']; |
90 | 90 | } |
91 | 91 |
@@ -16,7 +16,7 @@ |
||
16 | 16 | $list = new EntityCollection(); |
17 | 17 | |
18 | 18 | if (!empty($data['list'])) { |
19 | - array_map(function ($item) use ($list) { |
|
19 | + array_map(function($item) use ($list) { |
|
20 | 20 | $list->push(ResponseDtoBuilder::make(PurchaseRedeemHistoryResponseItem::class, $item)); |
21 | 21 | }, $data['list']); |
22 | 22 | } |