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