AndroidFcmOptions::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace NotificationChannels\Fcm\Resources;
4
5
class AndroidFcmOptions implements FcmResource
6
{
7
    /**
8
     * @var string|null
9
     */
10
    protected $analyticsLabel;
11
12
    /**
13
     * @return static
14
     */
15
    public static function create(): self
16
    {
17
        return new self;
18
    }
19
20
    /**
21
     * @return string|null
22
     */
23
    public function getAnalyticsLabel(): ?string
24
    {
25
        return $this->analyticsLabel;
26
    }
27
28
    /**
29
     * @param string|null $analyticsLabel
30
     * @return AndroidFcmOptions
31
     */
32
    public function setAnalyticsLabel(?string $analyticsLabel): self
33
    {
34
        $this->analyticsLabel = $analyticsLabel;
35
36
        return $this;
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function toArray(): array
43
    {
44
        return [
45
            'analytics_label' => $this->getAnalyticsLabel(),
46
        ];
47
    }
48
}
49