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 ( 4615dc...1bf145 )
by Andreas
01:58
created

ConnectionApi::delete()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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 ConnectionApi
12
 */
13
class ConnectionApi implements ConnectionApiResourceInterface
14
{
15
    /**
16
     * @var CommonResourceClientInterface
17
     */
18
    private $resourceClient;
19
20
    /**
21
     * @param CommonResourceClientInterface $resourceClient
22
     */
23
    public function __construct(CommonResourceClientInterface $resourceClient)
24
    {
25
        $this->resourceClient = $resourceClient;
26
    }
27
28
    /**
29
     * @inheritDoc
30
     */
31
    public function create(array $data): array
32
    {
33
        return $this->resourceClient->createResource('api/3/connections', [], $data);
34
    }
35
36
    /**
37
     * @inheritDoc
38
     */
39
    public function delete(int $id): bool
40
    {
41
        return $this->resourceClient->deleteResource('api/3/connections/%s', [$id]);
42
    }
43
44
    /**
45
     * @inheritDoc
46
     */
47
    public function get(int $id): array
48
    {
49
        return $this->resourceClient->getResource('api/3/connections/%s', [$id]);
50
    }
51
52
    /**
53
     * @inheritDoc
54
     */
55
    public function update(int $id, array $data = []): array
56
    {
57
        return $this->resourceClient->updateResource('api/3/connections/%s', [$id], $data);
58
    }
59
}
60