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.

Code Duplication    Length = 35-35 lines in 2 locations

src/Parcels.php 1 location

@@ 10-44 (lines=35) @@
7
use ShippoClient\Http\Request\Parcels\CreateObject;
8
use ShippoClient\Http\Response\ParcelList;
9
10
class Parcels
11
{
12
    private $request;
13
14
    public function __construct(Request $request)
15
    {
16
        $this->request = $request;
17
    }
18
19
    public function create(array $attributes)
20
    {
21
        $createObj = new CreateObject($attributes);
22
        $responseArray = $this->request->post('parcels', $createObj->toArray());
23
24
        return new Parcel($responseArray);
25
    }
26
27
    public function retrieve($objectId)
28
    {
29
        $responseArray = $this->request->get("parcels/$objectId");
30
31
        return new Parcel($responseArray);
32
    }
33
34
    /**
35
     * @param null|int $results
36
     * @return ParcelList
37
     */
38
    public function getList($results = null)
39
    {
40
        $responseArray = $this->request->get("parcels", ['results' => $results]);
41
42
        return new ParcelList($responseArray);
43
    }
44
}
45

src/Transactions.php 1 location

@@ 10-44 (lines=35) @@
7
use ShippoClient\Http\Request\Transactions\CreateObject;
8
use ShippoClient\Http\Response\TransactionList;
9
10
class Transactions
11
{
12
    private $request;
13
14
    public function __construct(Request $request)
15
    {
16
        $this->request = $request;
17
    }
18
19
    public function purchase($rateObjectId)
20
    {
21
        $createObject = new CreateObject(['rate' => $rateObjectId]);
22
        $responseArray = $this->request->post("transactions", $createObject->toArray());
23
24
        return new Transaction($responseArray);
25
    }
26
27
    public function retrieve($objectId)
28
    {
29
        $responseArray = $this->request->get("transactions/$objectId");
30
31
        return new Transaction($responseArray);
32
    }
33
34
    /**
35
     * @param null|int $results
36
     * @return TransactionList
37
     */
38
    public function getList($results = null)
39
    {
40
        $responseArray = $this->request->get("transactions", ['results' => $results]);
41
42
        return new TransactionList($responseArray);
43
    }
44
}
45