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 ( c8b447...30f819 )
by Freek
05:34
created

WebhookCallEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 23

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 23
rs 9.552
c 0
b 0
f 0
cc 1
nc 1
nop 10

How to fix   Many Parameters   

Many Parameters

Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.

There are several approaches to avoid long parameter lists:

1
<?php
2
3
namespace Spatie\WebhookServer\Events;
4
5
use GuzzleHttp\Psr7\Response;
6
7
abstract class WebhookCallEvent
8
{
9
    /** @var string */
10
    public string $httpVerb;
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
11
12
    /** @var string */
13
    public string $webhookUrl;
14
15
    /** @var array */
16
    public array $payload;
17
18
    /** @var array */
19
    public array $headers;
20
21
    /** @var array */
22
    public array $meta;
23
24
    /** @var array */
25
    public array $tags;
26
27
    /** @var int */
28
    public int $attempt;
29
30
    /** @var \GuzzleHttp\Psr7\Response|null */
31
    public ?Response $response;
32
33
    /** @var string */
34
    public ?string $errorType;
35
36
    /** @var string */
37
    public ?string $errorMessage;
38
39
    public function __construct(
40
        string $httpVerb,
41
        string $webhookUrl,
42
        array $payload,
43
        array $headers,
44
        array $meta,
45
        array $tags,
46
        int $attempt,
47
        ?Response $response,
48
        ?string $errorType,
49
        ?string $errorMessage
50
    ) {
51
        $this->httpVerb = $httpVerb;
52
        $this->webhookUrl = $webhookUrl;
53
        $this->payload = $payload;
54
        $this->headers = $headers;
55
        $this->meta = $meta;
56
        $this->tags = $tags;
57
        $this->attempt = $attempt;
58
        $this->response = $response;
59
        $this->errorType = $errorType;
60
        $this->errorMessage = $errorMessage;
61
    }
62
}
63