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 ( 338242...a0f447 )
by A s m
04:11
created

Currency   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 2
Metric Value
eloc 13
c 2
b 0
f 2
dl 0
loc 36
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A currency() 0 6 1
A activeCurrencys() 0 6 1
A currencyQuote() 0 6 1
A fee() 0 6 1
1
<?php
2
3
namespace Multicoin\Api\Traits;
4
5
trait Currency
6
{
7
    public function activeCurrencys()
8
    {
9
        $url = '/currency';
10
        $response = $this->client->doGet($url);
11
12
        return $response;
13
    }
14
15
    public function currency()
16
    {
17
        $url = $this->buildUrl('/index');
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('/index');
Loading history...
18
        $response = $this->client->doGet($url);
19
20
        return $response;
21
    }
22
    public function fee()
23
    {
24
        $url = $this->buildUrl('/fee');
25
        $response = $this->client->doGet($url);
26
27
        return $response;
28
    }
29
    // binance
30
    // bitcoinaverage
31
    // Bitstamp
32
    // Bittrex
33
    // CoinMarketCap
34
    // Poloniex
35
    public function currencyQuote($provider = null, $coin = null)
36
    {
37
        $client = new \Tokenly\CryptoQuoteClient\Client();
38
        $quote = $client->getQuote($provider ?? 'binance', 'USD', $coin ?? $this->coin);
39
40
        return collect($quote);
41
    }
42
}
43