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.

EventConfig   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 71
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 71
rs 10
c 0
b 0
f 0
wmc 9

5 Methods

Rating   Name   Duplication   Size   Complexity  
B __construct() 0 13 5
A getClass() 0 3 1
A getParams() 0 3 1
A getCommand() 0 3 1
A getType() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Teebot\Configuration\ValueObject;
6
7
/**
8
 * EventConfig value object
9
 */
10
class EventConfig
11
{
12
    /**
13
     * @var string
14
     */
15
    protected $command;
16
17
    /**
18
     * @var string
19
     */
20
    protected $type;
21
22
    /**
23
     * @var string
24
     */
25
    protected $class;
26
27
    /**
28
     * @var array
29
     */
30
    protected $params = [];
31
32
    /**
33
     * @param array $data
34
     */
35
    public function __construct(array $data)
36
    {
37
        if (isset($data['command'])) {
38
            $this->command = $data['command'];
39
        }
40
        if (isset($data['type'])) {
41
            $this->type = $data['type'];
42
        }
43
        if (isset($data['class'])) {
44
            $this->class = $data['class'];
45
        }
46
        if (isset($data['params'])) {
47
            $this->params = $data['params'];
48
        }
49
    }
50
51
    /**
52
     * @return string|null
53
     */
54
    public function getCommand(): ?string
55
    {
56
        return $this->command;
57
    }
58
59
    /**
60
     * @return  string|null
61
     */
62
    public function getType(): ?string
63
    {
64
        return $this->type;
65
    }
66
67
    /**
68
     * @return  string|null
69
     */
70
    public function getClass(): ?string
71
    {
72
        return $this->class;
73
    }
74
75
    /**
76
     * @return array
77
     */
78
    public function getParams(): array
79
    {
80
        return $this->params;
81
    }
82
}
83