Skip to content

Commit

Permalink
Added PhpDoc comments for constructor and exception in Ethereum\CallT…
Browse files Browse the repository at this point in the history
…ransaction
  • Loading branch information
owenvoke committed Oct 19, 2017
1 parent 66cb043 commit 0d810c4
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/CallTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,16 @@ class CallTransaction extends EthDataType {
protected $data;
protected $nonce;

/**
* Constructor.
*/
/**
* Constructor.
* @param EthD20 $to
* @param EthD20|null $from
* @param EthQ|null $gas
* @param EthQ|null $gasPrice
* @param EthQ|null $value
* @param EthD|null $data
* @param EthQ|null $nonce
*/
public function __construct(EthD20 $to, EthD20 $from = NULL, EthQ $gas = NULL, EthQ $gasPrice = NULL, EthQ $value = NULL, EthD $data = NULL, EthQ $nonce = NULL) {
$this->to = $to;
$this->from = $from;
Expand Down Expand Up @@ -97,7 +104,11 @@ public function getType() {
return 'CallTransaction';
}

public function toArray() {
/**
* @return array
* @throws \Exception
*/
public function toArray() {
$return = array();
(!is_null($this->to)) ? $return['to'] = $this->to->hexVal() : NULL;
(!is_null($this->from)) ? $return['from'] = $this->from->hexVal() : NULL;
Expand Down

0 comments on commit 0d810c4

Please sign in to comment.