Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kilvn committed May 20, 2020
1 parent cbb0a35 commit c5f8139
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Installation is possible using Composer.
If you don't already use Composer, you can download the composer.phar binary:

```bash
curl -sS https://getcomposer.org/installer | php
> curl -sS https://getcomposer.org/installer | php
```

Then install the library:
Expand All @@ -35,7 +35,7 @@ Use the Ripple
$address = "";
$secret_key = "";

$ripple = new \IEXBase\RippleAPI\Ripple(string $address, string $secret_key = "");
$ripple = new \IEXBase\RippleAPI\Ripple($address, $secret_key = "");

//$account = $ripple->getAccount();
//dump($account);
Expand Down
16 changes: 8 additions & 8 deletions src/RippleClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ class RippleClient
*
* @var string
*/
protected $WSSNode;
protected string $WSSNode;

/**
* Guzzle Http Client
*
* @var Client
*/
protected $client;
protected Client $client;

/**
* Number of requests
*
* @var integer
* @var int
*/
protected $requestCount = 0;
protected int $requestCount = 0;

/**
* Create a new RippleClient object
Expand Down Expand Up @@ -87,8 +87,8 @@ public function sendRequest($method, $path, $options = [], $api = true)
}
return $this->toArray($response->getBody()->getContents());

} catch (GuzzleException $e) {
die($e->getMessage());
} catch (GuzzleException $exception) {
return ['result' => 'error', 'message' => $exception->getMessage()];
}
}

Expand All @@ -109,8 +109,8 @@ public function sendRequestWss($method, $path, $options = [])
$response = $this->client->request($method, $url, ['query' => $options]);
return $this->toArray($response->getBody()->getContents());

} catch (GuzzleException $e) {
die($e->getMessage());
} catch (GuzzleException $exception) {
return ['result' => 'error', 'message' => $exception->getMessage()];
}
}

Expand Down

0 comments on commit c5f8139

Please sign in to comment.