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 ( 5d4268...446cb4 )
by Sebastian
11s
created

Html::empty()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Spatie\Menu;
4
5
use Spatie\Menu\Html\Attributes;
6
use Spatie\Menu\Traits\Activatable as ActivatableTrait;
7
use Spatie\Menu\Traits\HasParentAttributes as HasParentAttributesTrait;
8
9
class Html implements Item, Activatable, HasParentAttributes
10
{
11
    use ActivatableTrait, HasParentAttributesTrait;
12
13
    /** @var string */
14
    protected $html;
15
16
    /** @var string|null */
17
    protected $url = null;
18
19
    /** @var bool */
20
    protected $active = false;
21
22
    /** @var \Spatie\Menu\Html\Attributes */
23
    protected $parentAttributes;
24
25
    /**
26
     * @param string $html
27
     */
28
    protected function __construct(string $html)
29
    {
30
        $this->html = $html;
31
        $this->parentAttributes = new Attributes();
32
    }
33
34
    /**
35
     * Create an item containing a chunk of raw html.
36
     *
37
     * @param string $html
38
     *
39
     * @return static
40
     */
41
    public static function raw(string $html)
42
    {
43
        return new static($html);
44
    }
45
46
    /**
47
     * Create an empty item.
48
     *
49
     * @return static
50
     */
51
    public static function empty()
52
    {
53
        return new static('');
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function html(): string
60
    {
61
        return $this->html;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function render(): string
68
    {
69
        return $this->html;
70
    }
71
}
72