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.
Completed
Push — master ( c3b60f...35c3e9 )
by Niels
04:43
created

GatewayRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 42
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A all() 0 10 1
A show() 0 10 2
1
<?php namespace Ntholenaar\MultiSafepayClient\Request;
2
3
class GatewayRequest extends Request
4
{
5
    /**
6
     * {@inheritdoc}
7
     */
8
    protected $baseUrl = 'gateways';
9
10
    /**
11
     * Get all gateways.
12
     *
13
     * @param null $country
14
     * @param null $currency
15
     * @param null $amount
16
     * @return \Psr\Http\Message\RequestInterface
17
     */
18
    public function all($country = null, $currency = null, $amount = null)
19
    {
20
        $uri = $this->getUriFactory()->createUri($this->getBaseUrl());
21
22
        $parameters = array_filter(
23
            compact('country', 'currency', 'amount')
24
        );
25
26
        return $this->get($uri, $parameters);
27
    }
28
29
    /**
30
     *
31
     * @param $identifier
32
     * @return \Psr\Http\Message\RequestInterface
33
     */
34
    public function show($identifier)
35
    {
36
        if (empty($identifier)) {
37
            throw new \InvalidArgumentException('Invalid identifier provided.');
38
        }
39
40
        return $this->get(
41
            $this->getUriFactory()->createUri($this->getBaseUrl() . '/' . $identifier)
42
        );
43
    }
44
}
45