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 ( 6399ca...baf078 )
by Marcel
02:27
created

OneSignalWebButton::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace NotificationChannels\OneSignal;
4
5
/**
6
 * Class OneSignalWebButton.
7
 */
8
class OneSignalWebButton
9
{
10
    /** @var string */
11
    protected $id;
12
13
    /** @var string */
14
    protected $text;
15
16
    /** @var string */
17
    protected $icon;
18
19
    /** @var string */
20
    protected $url;
21
22
    /**
23
     * @param string $id
24
     *
25
     * @return static
26
     */
27
    public static function create($id)
28
    {
29
        return new static($id);
30
    }
31
32
    /**
33
     * @param string $id
34
     */
35
    public function __construct($id)
36
    {
37
        $this->id = $id;
38
    }
39
40
    /**
41
     * Set the message icon.
42
     *
43
     * @param string $value
44
     *
45
     * @return $this
46
     */
47
    public function icon($value)
48
    {
49
        $this->icon = $value;
50
51
        return $this;
52
    }
53
54
    /**
55
     * Set the message subject.
56
     *
57
     * @param string $value
58
     *
59
     * @return $this
60
     */
61
    public function text($value)
62
    {
63
        $this->text = $value;
64
65
        return $this;
66
    }
67
68
    /**
69
     * Set the message url.
70
     *
71
     * @param string $value
72
     *
73
     * @return $this
74
     */
75
    public function url($value)
76
    {
77
        $this->url = $value;
78
79
        return $this;
80
    }
81
82
    /**
83
     * @return array
84
     */
85
    public function toArray()
86
    {
87
        return [
88
            'id' => $this->id,
89
            'text' => $this->text,
90
            'icon' => $this->icon,
91
            'url' => $this->url,
92
        ];
93
    }
94
}
95