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.

AbandonedCartApi   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 24
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 3 1
A __construct() 0 3 1
1
<?php
2
declare(strict_types=1);
3
/**
4
 */
5
6
namespace CommerceLeague\ActiveCampaignApi\Api;
7
8
use CommerceLeague\ActiveCampaignApi\Client\CommonResourceClientInterface;
9
10
/**
11
 * Class AbandonedCartApi
12
 */
13
class AbandonedCartApi implements AbandonedCartApiResourceInterface
14
{
15
    protected const ABANDONED_CARTS_URI = 'api/3/ecomOrders';
16
17
18
    /**
19
     * @var CommonResourceClientInterface
20
     */
21
    private $resourceClient;
22
23
    /**
24
     * @param CommonResourceClientInterface $resourceClient
25
     */
26
    public function __construct(CommonResourceClientInterface $resourceClient)
27
    {
28
        $this->resourceClient = $resourceClient;
29
    }
30
31
    /**
32
     * @inheritDoc
33
     */
34
    public function create(array $data): array
35
    {
36
        return $this->resourceClient->createResource(self::ABANDONED_CARTS_URI, [], $data);
37
    }
38
}
39