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

Address   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 67
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 27
c 1
b 1
f 0
dl 0
loc 67
rs 10
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A transactionsFromApi() 0 6 1
A transactionsFromDb() 0 6 1
A address() 0 6 1
A addressUtxo() 0 6 1
A addressNew() 0 7 1
A addressTxs() 0 8 1
A addressValidate() 0 6 1
A addressBalance() 0 6 1
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
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

9
        /** @scrutinizer ignore-call */ 
10
        $url = $this->buildUrl('/addr/'.$address);
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
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

36
        $url .= '?'.$this->/** @scrutinizer ignore-call */ buildQueryParam($default, $param);
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 addressValidate($address)
51
    {
52
        $url = $this->buildUrl('/addr/'.$address.'/validate');
53
        $response = $this->client->doGet($url);
54
55
        return $response;
56
    }
57
58
    public function transactionsFromApi($address)
59
    {
60
        $url = $this->buildUrl('/'.$address.'/txfromapi');
61
        $response = $this->client->doGet($url);
62
63
        return $response;
64
    }
65
66
    public function transactionsFromDb($address)
67
    {
68
        $url = $this->buildUrl('/'.$address.'/txfromdb');
69
        $response = $this->client->doGet($url);
70
71
        return $response;
72
    }
73
}
74