Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function testSuccessEndpoint() |
||
14 | { |
||
15 | $bybitApi = (new BybitAPI()) |
||
|
|||
16 | ->setCredentials('https://api-testnet.bybit.com', 'fL02oi5qo8i2jDxlum', 'Ne1EE35XTprIWrId9vGEAc1ZYJTmodA4qFzZ'); |
||
17 | |||
18 | $cancelOrderResponse = $bybitApi->privateEndpoint(CancelOrder::class, |
||
19 | (new CancelOrderRequest())->setSymbol('BTCUSDT')->setOrderId('78b869b7-f682-41fe-9edc-dc2dfaaf8d79'))->execute(); |
||
20 | |||
21 | echo "Return code: {$cancelOrderResponse->getReturnCode()} \n"; |
||
22 | echo "Return message: {$cancelOrderResponse->getReturnMessage()} \n"; |
||
23 | |||
24 | /** @var CancelOrderResponse $cancelOrderInfo */ |
||
25 | $cancelOrderInfo = $cancelOrderResponse->getResult(); |
||
26 | |||
27 | echo "Order ID: {$cancelOrderInfo->getOrderId()} \n"; |
||
28 | echo "Order Link ID: {$cancelOrderInfo->getOrderLinkId()} \n"; |
||
29 | |||
30 | $this->assertTrue(true); |
||
31 | } |
||
32 | } |
This check compares calls to functions or methods with their respective definitions. If the call has less arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.