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 ( 45ff2b...467862 )
by Gallice
02:30
created

AccountLink   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 36
ccs 10
cts 10
cp 1
rs 10
c 1
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getUrl() 0 4 1
A jsonSerialize() 0 7 1
1
<?php
2
3
namespace Tgallice\FBMessenger\Model\Button;
4
5
use Tgallice\FBMessenger\Model\Button;
6
7
class AccountLink extends Button
8
{  
0 ignored issues
show
Coding Style introduced by
The opening class brace should be on a newline by itself.
Loading history...
9
    /**
10
     * @var string
11
     */
12
    private $url;
13
14
    /**
15
     * @param string $url
16
     */
17 5
    public function __construct($url)
18
    {
19 5
        parent::__construct(Button::TYPE_ACCOUNT_LINK);
20
21 5
        $this->url = $url;
22 5
    }
23
24
    /**
25
     * @return string
26
     */
27 1
    public function getUrl()
28
    {
29 1
        return $this->url;
30
    }
31
32
    /**
33
     * @inheritdoc
34
     */
35 1
    public function jsonSerialize()
36
    {
37 1
        $json = parent::jsonSerialize();
38 1
        $json['url'] = $this->url;
39
40 1
        return $json;
41
    }
42
}
43