minulislam /
multicoin-api
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Multicoin\Api\Traits; |
||||
| 4 | |||||
| 5 | trait Invoice |
||||
| 6 | { |
||||
| 7 | public function createInvoice(array $param = []) |
||||
| 8 | { |
||||
| 9 | $default = [ |
||||
| 10 | 'user_id' => '', |
||||
| 11 | 'callback' => '', |
||||
| 12 | 'forward' => '0', |
||||
| 13 | 'amount' => '0.00', |
||||
| 14 | 'address' => '', |
||||
| 15 | ]; |
||||
| 16 | |||||
| 17 | $url = $this->buildUrl('/receive'); |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 18 | $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...
|
|||||
| 19 | $response = $this->client->doGet($url); |
||||
| 20 | |||||
| 21 | return $response; |
||||
| 22 | } |
||||
| 23 | |||||
| 24 | public function paidInvoice() |
||||
| 25 | { |
||||
| 26 | $url = $this->buildUrl('/paid-invoices'); |
||||
| 27 | $response = $this->client->doGet($url); |
||||
| 28 | |||||
| 29 | return $response; |
||||
| 30 | } |
||||
| 31 | |||||
| 32 | public function unpaidInvoice() |
||||
| 33 | { |
||||
| 34 | $url = $this->buildUrl('/unpaid-invoices'); |
||||
| 35 | $response = $this->client->doGet($url); |
||||
| 36 | |||||
| 37 | return $response; |
||||
| 38 | } |
||||
| 39 | } |
||||
| 40 |