Skip to content

Commit

Permalink
update date
Browse files Browse the repository at this point in the history
  • Loading branch information
serderovsh committed Sep 11, 2018
1 parent c3cb5b0 commit 79bb742
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
examples/index.php
composer.phar
composer.phar
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "A PHP API for interacting with Ripple",
"license": "MIT",
"type": "library",
"version": "1.0",
"support": {
"issues": "https://github.com/iexbase/ripple-api/issues",
"source": "https://github.com/iexbase/ripple-api"
Expand All @@ -23,7 +24,8 @@

"require": {
"php": "^7.1",
"guzzlehttp/guzzle": "^6.3"
"guzzlehttp/guzzle": "^6.3",
"symfony/var-dumper": "^4.1"
},

"require-dev": {
Expand Down
10 changes: 7 additions & 3 deletions src/Ripple.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ public function getAccountBalances($address = null, $params = []) : array
*
* @param null $address
* @param array $params
* @return PaymentObject
* @return PaymentObject | array
*/
public function getAccountPayments($address = null, $params = []) : PaymentObject
public function getAccountPayments($address = null, $params = [])
{
$address = ($address == null ? $this->address : $address);
$response = $this->call('GET', sprintf('/accounts/%s/payments', $address), $params);
Expand Down Expand Up @@ -216,11 +216,15 @@ public function getAccountValueStat($address = null, $params = [])
*
* @param null $hash
* @param array $params
* @return TransactionObject
* @return TransactionObject | array
*/
public function getTransaction($hash = null, $params = [])
{
$response = $this->call('GET', '/transactions/'.$hash, $params);

if(isset($response['count']) and $response['count'] > 1) {
return $response['transactions'];
}
return new TransactionObject($response['transaction']);
}

Expand Down

0 comments on commit 79bb742

Please sign in to comment.