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 ( df2670...912221 )
by Gallice
03:05
created

PhoneNumber   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 55
ccs 16
cts 16
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A getTitle() 0 4 1
A getPhoneNumber() 0 4 1
A jsonSerialize() 0 8 1
1
<?php
2
3
namespace Tgallice\FBMessenger\Model\Button;
4
5
use Tgallice\FBMessenger\Model\Button;
6
7
class PhoneNumber extends Button
8
{
9
    /**
10
     * @var string
11
     */
12
    private $title;
13
14
    /**
15
     * @var string
16
     */
17
    private $phoneNumber;
18
19
    /**
20
     * @param string $title
21
     * @param string $phoneNumber
22
     */
23 8
    public function __construct($title, $phoneNumber)
24
    {
25 8
        parent::__construct(Button::TYPE_PHONE_NUMBER);
26
27 8
        self::validateTitleSize($title);
28 7
        $this->title = $title;
29
30 7
        self::validatePhoneNumber($phoneNumber);
31 6
        $this->phoneNumber = $phoneNumber;
32 6
    }
33
34
    /**
35
     * @return string
36
     */
37 1
    public function getTitle()
38
    {
39 1
        return $this->title;
40
    }
41
42
    /**
43
     * @return string
44
     */
45 1
    public function getPhoneNumber()
46
    {
47 1
        return $this->phoneNumber;
48
    }
49
50
    /**
51
     * @inheritdoc
52
     */
53 1
    public function jsonSerialize()
54
    {
55 1
        $json = parent::jsonSerialize();
56 1
        $json['title'] = $this->title;
57 1
        $json['payload'] = $this->phoneNumber;
58
59 1
        return $json;
60
    }
61
}
62