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 ( f91a4c...f91a4c )
by Dave
39:26 queued 34:22
created

Link::attributes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace SleepingOwl\Admin\Display;
4
5
use KodiComponents\Support\HtmlAttributes;
6
7 View Code Duplication
class Link
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
8
{
9
    use HtmlAttributes;
10
11
    protected $url;
12
    protected $title;
13
14
    public function __construct($url, $title)
15
    {
16
        $this->url = $url;
17
        $this->title = $title;
18
    }
19
20
    public function getUrl()
21
    {
22
        return $this->url;
23
    }
24
25
    public function setUrl($url)
26
    {
27
        $this->url = $url;
28
    }
29
30
    public function getTitle()
31
    {
32
        return $this->title;
33
    }
34
35
    public function setTitle($title)
36
    {
37
        $this->title = $title;
38
    }
39
40
    public function blank()
41
    {
42
        $this->setHtmlAttribute('target', '_blank');
43
44
        return $this;
45
    }
46
47
    public static function create($url, $title)
48
    {
49
        return new static($url, $title);
50
    }
51
52
    public function attributes()
53
    {
54
        return $this->htmlAttributesToString();
55
    }
56
}
57