Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function testGetTradingFeeRateEndpoint() |
||
13 | { |
||
14 | $bybit = (new BybitAPI()) |
||
|
|||
15 | ->setCredentials('https://api-testnet.bybit.com', 'fL02oi5qo8i2jDxlum', 'Ne1EE35XTprIWrId9vGEAc1ZYJTmodA4qFzZ'); |
||
16 | |||
17 | $feeRateData = $bybit->privateEndpoint(GetTradingFeeRate::class, (new GetTradingFeeRateRequest()))->execute(); |
||
18 | |||
19 | echo "Return code: {$feeRateData->getReturnCode()} \n"; |
||
20 | echo "Return message: {$feeRateData->getReturnMessage()} \n"; |
||
21 | |||
22 | /** @var GetTradingFeeRateResponseItem $feeRate */ |
||
23 | foreach (array_slice($feeRateData->getResult()->getFeeRates(), 0, 3) as $feeRate) { |
||
24 | echo "---\n"; |
||
25 | echo "Symbol: {$feeRate->getSymbol()} \n"; |
||
26 | echo "Taker Fee Rate: {$feeRate->getTakerFeeRate()} \n"; |
||
27 | echo "Maker Fee Rate: {$feeRate->getMakerFeeRate()} \n"; |
||
28 | } |
||
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.