| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | { |
||
| 16 | $bybit = (new BybitAPI())->setCredentials('https://api-testnet.bybit.com'); |
||
| 17 | |||
| 18 | $indexPriceKlineResponse = $bybit->publicEndpoint(IndexPriceKline::class, (new IndexPriceKlineRequest()) |
||
| 19 | ->setSymbol('BTCUSDT') |
||
| 20 | ->setInterval(EnumIntervals::HOUR_1) |
||
| 21 | ->setStart('2024-07-11 10:00:00') |
||
| 22 | ->setEnd('2024-07-12 11:00:00') |
||
| 23 | ->setLimit(4) |
||
| 24 | )->execute(); |
||
| 25 | |||
| 26 | echo "Return code: {$indexPriceKlineResponse->getReturnCode()}\n"; |
||
| 27 | echo "Return message: {$indexPriceKlineResponse->getReturnMessage()}\n"; |
||
| 28 | |||
| 29 | /** @var IndexPriceKlineResponseItem $indexItem */ |
||
| 30 | foreach ($indexPriceKlineResponse->getResult()->getKlineList() as $indexItem) { |
||
| 31 | echo " --- \n"; |
||
| 32 | echo "Start Time: {$indexItem->getStartTime()->format('Y-m-d H:i:s')}\n"; |
||
| 41 | } |
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.