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 ( f97fa9...d5dc5f )
by Sebastian
03:35
created

Html::render()   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
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Spatie\Menu;
4
5
use Spatie\HtmlElement\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 bool */
17
    protected $active = false;
18
19
    /** @var \Spatie\HtmlElement\Attributes */
20
    protected $parentAttributes;
21
22
    /**
23
     * @param string $html
24
     */
25
    protected function __construct(string $html)
26
    {
27
        $this->html = $html;
28
        $this->parentAttributes = new Attributes();
29
    }
30
31
    /**
32
     * Create an item containing a chunk of raw html.
33
     *
34
     * @param string $html
35
     *
36
     * @return static
37
     */
38
    public static function raw(string $html)
39
    {
40
        return new static($html);
41
    }
42
43
    /**
44
     * @return string
45
     */
46
    public function html(): string
47
    {
48
        return $this->html;
49
    }
50
51
    /**
52
     * @return string
53
     */
54
    public function render(): string
55
    {
56
        return $this->html;
57
    }
58
}
59