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.

PushLogClient   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 40
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A storePushLog() 0 22 1
1
<?php
2
3
namespace NStack\Clients;
4
5
/**
6
 * Class PushLogClient
7
 *
8
 * @package NStack\Clients
9
 * @author  Tiago Araujo <[email protected]>
10
 */
11
class PushLogClient extends NStackClient
12
{
13
    /** @var string */
14
    protected $path = 'ugc';
15
16
    /**
17
     * storePushLog
18
     *
19
     * @param String      $provider
20
     * @param String      $key
21
     * @param String      $type
22
     * @param bool        $succeeded
23
     * @param String|null $request
24
     * @param String|null $response
25
     * @param int|null    $userId
26
     * @param String|null $relationType
27
     * @param int|null    $relationId
28
     */
29
    public function storePushLog(
30
        String $provider,
31
        String $key,
32
        String $type,
33
        bool $succeeded,
34
        String $request = null,
35
        String $response = null,
36
        int $userId = null,
37
        String $relationType = null,
38
        int $relationId = null
39
    ) {
40
        $this->client->post($this->buildPath($this->path), [
41
            'body' => '{
42
                            "provider": "' . $provider . '",
43
                            "key": "' . $key . '",
44
                            "type": "' . $type . '",
45
                            "succeeded": ' . $succeeded . ',
46
                            "request": { ' . $request . ', },
47
                            "response": { ' . $response . ', },
48
                            "user_id": ' . $userId . '
49
                            "relation_type": "' . $relationType . '",
50
                            "relation_id": ' . $relationId . '
51
                        }',
52
        ]);
53
    }
54
}