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.
Passed
Push — master ( e6911b...12118e )
by Gallice
04:03
created

Referral::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Tgallice\FBMessenger\Model\Callback;
4
5
class Referral
6
{
7
    /**
8
     * @var string
9
     */
10
    private $ref;
11
12
    /**
13
     * @var string
14
     */
15
    private $source;
16
17
    /**
18
     * @var string
19
     */
20
    private $type;
21
22
    /**
23
     * @param string $ref
24
     * @param string $source
25
     * @param string $type
26
     */
27 5
    public function __construct($ref, $source, $type)
28
    {
29 5
        $this->ref = $ref;
30 5
        $this->source = $source;
31 5
        $this->type = $type;
32 5
    }
33
34
    /**
35
     * @return string
36
     */
37 1
    public function getRef()
38
    {
39 1
        return $this->ref;
40
    }
41
42
    /**
43
     * @return string
44
     */
45 1
    public function getSource()
46
    {
47 1
        return $this->source;
48
    }
49
50
    /**
51
     * @return string
52
     */
53 1
    public function getType()
54
    {
55 1
        return $this->type;
56
    }
57
58
    /**
59
     * @param array $payload
60
     *
61
     * @return static
62
     */
63 1
    public static function create(array $payload)
64
    {
65 1
        return new static($payload['ref'], $payload['source'], $payload['type']);
66
    }
67
}
68