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.

Refunds::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace ShippoClient;
4
5
use ShippoClient\Entity\Refund;
6
use ShippoClient\Http\Request;
7
use ShippoClient\Http\Response\RefundList;
8
9
class Refunds
10
{
11
    private $request;
12
13
    public function __construct(Request $request)
14
    {
15
        $this->request = $request;
16
    }
17
18
    public function create($transactionObjectId)
19
    {
20
        $responseArray = $this->request->post('refunds', ['transaction' => $transactionObjectId]);
21
22
        return new Refund($responseArray);
23
    }
24
25
    public function retrieve($objectId)
26
    {
27
        $responseArray = $this->request->get("refunds/$objectId");
28
29
        return new Refund($responseArray);
30
    }
31
32
    /**
33
     * @param null|int $results
34
     * @return RefundList
35
     */
36
    public function getList($results = null)
37
    {
38
        $responseArray = $this->request->get("refunds", ['results' => $results]);
39
40
        return new RefundList($responseArray);
41
    }
42
}
43