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 ( 274e4d...eeb2e1 )
by Saša
02:02
created

BoardingCard::setNumber()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace App;
4
5
class BoardingCard
6
{
7
    /** @var string */
8
    private $from;
9
    /** @var string */
10
    private $to;
11
    /** @var string */
12
    private $type;
13
    /** @var string */
14
    private $number;
15
    /** @var string */
16
    private $info;
17
18
    /**
19
     * BoardingCard constructor.
20
     *
21
     * @param array $card
22
     */
23
    public function __construct(array $card = [])
24
    {
25
        $this->from = isset($card['from']) ? $card['from'] : '';
26
        $this->to = isset($card['to']) ? $card['to'] : '';
27
        $this->type = isset($card['type']) ? $card['type'] : '';
28
        $this->number = isset($card['number']) ? $card['number'] : '';
29
        $this->info = isset($card['info']) ? $card['info'] : '';
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getFrom(): string
36
    {
37
        return $this->from;
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getTo(): string
44
    {
45
        return $this->to;
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getType(): string
52
    {
53
        return $this->type;
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getNumber(): string
60
    {
61
        return $this->number;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getInfo(): string
68
    {
69
        return $this->info;
70
    }
71
72
    /**
73
     * Convert to array.
74
     *
75
     * @return array
76
     */
77
    public function toArray()
78
    {
79
        return [
80
            'from' => $this->getFrom(),
81
            'to' => $this->getTo(),
82
            'type' => $this->getType(),
83
            'number' => $this->getNumber(),
84
            'info' => $this->getInfo(),
85
        ];
86
    }
87
}
88