minulislam /
multicoin-api
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Multicoin\Api\Traits; |
||||
| 4 | |||||
| 5 | trait Address |
||||
| 6 | { |
||||
| 7 | public function address($address) |
||||
| 8 | { |
||||
| 9 | $url = $this->buildUrl('/addr/'.$address); |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 10 | $response = $this->client->doGet($url); |
||||
| 11 | |||||
| 12 | return $response; |
||||
| 13 | } |
||||
| 14 | |||||
| 15 | public function addressBalance($address) |
||||
| 16 | { |
||||
| 17 | $url = $this->buildUrl('/addr/'.$address.'/balance'); |
||||
| 18 | $response = $this->client->doGet($url); |
||||
| 19 | |||||
| 20 | return $response; |
||||
| 21 | } |
||||
| 22 | |||||
| 23 | public function addressNew() |
||||
| 24 | { |
||||
| 25 | $url = $this->buildUrl('/addr/new'); |
||||
| 26 | |||||
| 27 | $response = $this->client->doGet($url); |
||||
| 28 | |||||
| 29 | return $response; |
||||
| 30 | } |
||||
| 31 | |||||
| 32 | public function addressTxs($address, array $param = []) |
||||
| 33 | { |
||||
| 34 | $default = ['confirms' => 0]; |
||||
| 35 | $url = $this->buildUrl('/addr/'.$address.'/txs'); |
||||
| 36 | $url .= '?'.$this->buildQueryParam($default, $param); |
||||
|
0 ignored issues
–
show
It seems like
buildQueryParam() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 37 | $response = $this->client->doGet($url); |
||||
| 38 | |||||
| 39 | return $response; |
||||
| 40 | } |
||||
| 41 | |||||
| 42 | public function addressUtxo($address) |
||||
| 43 | { |
||||
| 44 | $url = $this->buildUrl('/addr/'.$address.'/utxo'); |
||||
| 45 | $response = $this->client->doGet($url); |
||||
| 46 | |||||
| 47 | return $response; |
||||
| 48 | } |
||||
| 49 | |||||
| 50 | public function addressUnconfirmed($address) |
||||
| 51 | { |
||||
| 52 | $url = $this->buildUrl('/addr/'.$address.'/unconfirmed'); |
||||
| 53 | $response = $this->client->doGet($url); |
||||
| 54 | |||||
| 55 | return $response; |
||||
| 56 | } |
||||
| 57 | |||||
| 58 | public function addressValidate($address) |
||||
| 59 | { |
||||
| 60 | $url = $this->buildUrl('/addr/'.$address.'/validate'); |
||||
| 61 | $response = $this->client->doGet($url); |
||||
| 62 | |||||
| 63 | return $response; |
||||
| 64 | } |
||||
| 65 | |||||
| 66 | public function transactionsFromApi($address) |
||||
| 67 | { |
||||
| 68 | $url = $this->buildUrl('/'.$address.'/txfromapi'); |
||||
| 69 | $response = $this->client->doGet($url); |
||||
| 70 | |||||
| 71 | return $response; |
||||
| 72 | } |
||||
| 73 | |||||
| 74 | public function transactionsFromDb($address) |
||||
| 75 | { |
||||
| 76 | $url = $this->buildUrl('/'.$address.'/txfromdb'); |
||||
| 77 | $response = $this->client->doGet($url); |
||||
| 78 | |||||
| 79 | return $response; |
||||
| 80 | } |
||||
| 81 | } |
||||
| 82 |