Issues (51)

example/02_getAccountBalance.php (1 issue)

Labels
Severity
1
<?php
2
/**
3
 * @author  Fabian Hanisch
4
 * @since   16.07.2017 02:55
5
 * @version 1.0
6
 */
7
8
require_once(__DIR__ . '/../vendor/autoload.php');
9
10
try {
11
    $api = new \HanischIt\KrakenApi\KrakenApi("Your-API-Key", "Your-API-Sign");
12
13
    $accountBalanceResponse = $api->getAccountBalance();
14
15
    foreach ($accountBalanceResponse->getBalanceModels() as $balanceModel) {
0 ignored issues
show
The method getBalanceModels() does not exist on HanischIt\KrakenApi\Model\ResponseInterface. It seems like you code against a sub-type of HanischIt\KrakenApi\Model\ResponseInterface such as HanischIt\KrakenApi\Call...\AccountBalanceResponse. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

15
    foreach ($accountBalanceResponse->/** @scrutinizer ignore-call */ getBalanceModels() as $balanceModel) {
Loading history...
16
        echo $balanceModel->getAssetName() . ": " . $balanceModel->getBalance() . "\n";
17
    }
18
} catch (Exception $e) {
19
    echo $e->getMessage();
20
}
21