Completed
Pull Request — master (#64)
by ARCANEDEV
29:17 queued 15:16
created

ExchangeRate   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 46
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A className() 0 4 1
A retrieve() 0 4 1
A all() 0 4 1
1
<?php namespace Arcanedev\Stripe\Resources;
2
3
use Arcanedev\Stripe\Contracts\Resources\ExchangeRate as ExchangeRateContract;
4
use Arcanedev\Stripe\StripeResource;
5
6
/**
7
 * Class     ExchangeRate
8
 *
9
 * @package  Arcanedev\Stripe\Resources
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class ExchangeRate extends StripeResource implements ExchangeRateContract
13
{
14
    /* -----------------------------------------------------------------
15
     |  Getters & Setters
16
     | -----------------------------------------------------------------
17
     */
18
19
    /**
20
     * Get The name of the class, with namespacing and underscores stripped.
21
     *
22
     * @param  string  $class
23
     *
24
     * @return string
25
     */
26
    public static function className($class = '')
27
    {
28
        return 'exchange_rate';
29
    }
30
31
    /* -----------------------------------------------------------------
32
     |  Main Methods
33
     | -----------------------------------------------------------------
34
     */
35
36
    /**
37
     * @param  array|string       $currency
38
     * @param  array|string|null  $options
39
     *
40
     * @return self
41
     */
42
    public static function retrieve($currency, $options = null)
43
    {
44
        return self::scopedRetrieve($currency, $options);
45
    }
46
47
    /**
48
     * @param  array|null         $params
49
     * @param  array|string|null  $options
50
     *
51
     * @return \Arcanedev\Stripe\Collection
52
     */
53
    public static function all($params = null, $options = null)
54
    {
55
        return self::scopedAll($params, $options);
0 ignored issues
show
Bug Compatibility introduced by
The expression self::scopedAll($params, $options); of type Arcanedev\Stripe\StripeO...Stripe\Collection|array adds the type array to the return on line 55 which is incompatible with the return type declared by the interface Arcanedev\Stripe\Contrac...urces\ExchangeRate::all of type Arcanedev\Stripe\Collection.
Loading history...
56
    }
57
}
58