GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — develop ( 7475b4...faeb8a )
by A s m
03:14
created

Invoice::createInvoice()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 1 Features 1
Metric Value
cc 1
eloc 10
c 3
b 1
f 1
nc 1
nop 1
dl 0
loc 15
rs 9.9332
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
It seems like buildUrl() 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 ignore-call  annotation

17
        /** @scrutinizer ignore-call */ 
18
        $url = $this->buildUrl('/receive');
Loading history...
18
        $url .= '?'.$this->buildQueryParam($default, $param);
0 ignored issues
show
Bug introduced by
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 ignore-call  annotation

18
        $url .= '?'.$this->/** @scrutinizer ignore-call */ buildQueryParam($default, $param);
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